mirror of
https://github.com/10h30/Test-Laravel-Migrations.git
synced 2026-06-05 15:07:54 +09:00
Task 3 - soft deletes
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user