Skip to content

Commit 363bf45

Browse files
Merge pull request #62 from CodeWithDennis/shorter-truncate-fix
Update truncate method to use User model in test setup
2 parents ef273cd + 6be3228 commit 363bf45

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/Feature/Filament/Resources/UserResourceTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
use App\Models\User;
77
use Filament\Actions\DeleteAction;
88
use Filament\Tables\Actions\DeleteBulkAction;
9-
use Illuminate\Support\Facades\DB;
109
use Illuminate\Support\Str;
1110

1211
use function Pest\Livewire\livewire;
1312

1413
beforeEach(function () {
1514
/* The TestCase setup generates a user before each test, so we need to clear the table to make sure we have a clean slate. */
16-
DB::table('users')->truncate();
15+
User::truncate();
1716
});
1817

1918
it('can render the index page', function () {

0 commit comments

Comments
 (0)