Skip to content

Commit

Permalink
refactor fun
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentauger committed Dec 19, 2024
1 parent 69fc3ac commit 10dd455
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/Feature/Filament/UserResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

$this->actingAs($user)->get($url)->assertForbidden();
})->with([
'ListUsers' => [fn() => ListUsers::getUrl()],
'CreateUser' => [fn() => CreateUser::getUrl()]
'ListUsers' => [fn () => ListUsers::getUrl()],
'CreateUser' => [fn () => CreateUser::getUrl()],
]);

it('An unauthorized user cannot render the edit page', function () {
Expand All @@ -39,11 +39,10 @@
$this->actingAs($admin)->get(CreateUser::getUrl())->assertForbidden();
});

it('render logout button', function(){})->todo();
it('logout path successful', function(){})->todo();
it('render logout button', function () {})->todo();
it('logout path successful', function () {})->todo();
});


describe('list users table', function () {
it('User Table has required columns', function () {
$admin = User::factory()->create();
Expand All @@ -56,7 +55,7 @@
'email_verified_at',
'active',
'roles.name',
])->each(fn($column) => $this->actingAs($admin)->livewire(ListUsers::class)->assertTableColumnExists($column));
])->each(fn ($column) => $this->actingAs($admin)->livewire(ListUsers::class)->assertTableColumnExists($column));
});

it('Admin can render the User Table column', function () {
Expand All @@ -70,7 +69,7 @@
'email_verified_at',
'active',
'roles.name',
])->each(fn($column) => $this->actingAs($admin)->livewire(ListUsers::class)->assertCanRenderTableColumn($column));
])->each(fn ($column) => $this->actingAs($admin)->livewire(ListUsers::class)->assertCanRenderTableColumn($column));
});

it('Admin can sort the User Table column', function () {
Expand Down

0 comments on commit 10dd455

Please sign in to comment.