Skip to content

Commit

Permalink
Clean up test
Browse files Browse the repository at this point in the history
From #526
  • Loading branch information
JosephSilber committed Jun 2, 2020
1 parent 0b14161 commit d5644d8
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions tests/MultipleAbilitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,24 +372,13 @@ function unforbidding_multiple_abilities_via_a_map($provider)
* @test
* @dataProvider bouncerProvider
*/
function checking_any_abilities($provider)
function passthru_can_any_check($provider)
{
list($bouncer, $user1, $user2) = $provider(2);
list($bouncer, $user1) = $provider();

$user1->allow('create', User::class);
$user1->allow('retrieve', User::class);
$user1->allow('update', User::class);
$user1->allow('delete', User::class);

$this->assertTrue($user1->can('create', User::class));
$this->assertTrue($user1->can('retrieve', User::class));
$this->assertTrue($user1->can('update', User::class));
$this->assertTrue($user1->can('delete', User::class));
$this->assertTrue($bouncer->canAny([
'create',
'retrieve',
'update',
'delete'
], User::class));

$this->assertTrue($bouncer->canAny(['create', 'delete'], User::class));
$this->assertFalse($bouncer->canAny(['update', 'delete'], User::class));
}
}

0 comments on commit d5644d8

Please sign in to comment.