Task 3 - soft deletes

This commit is contained in:
PovilasKorop
2021-11-09 10:18:02 +02:00
parent 40044cbfa4
commit 7c86c01048
5 changed files with 86 additions and 0 deletions
+12
View File
@@ -2,6 +2,7 @@
namespace Tests\Feature;
use App\Models\Project;
use App\Models\User;
use Illuminate\Support\Facades\Artisan;
use Tests\TestCase;
@@ -39,4 +40,15 @@ class MigrationsTest extends TestCase
$this->assertEquals(3, $fieldNumber);
}
public function test_soft_deletes()
{
// We just test if the test succeeds or throws an exception
$this->expectNotToPerformAssertions();
Artisan::call('migrate:fresh', ['--path' => '/database/migrations/task3']);
$project = Project::factory()->create();
$project->delete();
}
}