Skip to content

Commit ec6b782

Browse files
committed
Test added
1 parent bd9cf7d commit ec6b782

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/PermissionTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,15 @@ public function it_is_retrievable_by_id()
6767

6868
$this->assertEquals($this->testUserPermission->id, $permission_by_id->id);
6969
}
70+
71+
/** @test */
72+
public function it_can_delete_hydrated_permissions()
73+
{
74+
$this->reloadPermissions();
75+
76+
$permission = app(Permission::class)->findByName($this->testUserPermission->name);
77+
$permission->delete();
78+
79+
$this->assertCount(0, app(Permission::class)->where($this->testUserPermission->getKeyName(), $this->testUserPermission->getKey())->get());
80+
}
7081
}

0 commit comments

Comments
 (0)