Skip to content

Commit

Permalink
Test added
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 committed Nov 8, 2024
1 parent bd9cf7d commit ec6b782
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/PermissionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,15 @@ public function it_is_retrievable_by_id()

$this->assertEquals($this->testUserPermission->id, $permission_by_id->id);
}

/** @test */
public function it_can_delete_hydrated_permissions()
{
$this->reloadPermissions();

$permission = app(Permission::class)->findByName($this->testUserPermission->name);
$permission->delete();

$this->assertCount(0, app(Permission::class)->where($this->testUserPermission->getKeyName(), $this->testUserPermission->getKey())->get());
}
}

0 comments on commit ec6b782

Please sign in to comment.