public function test_can_check_if_has_access() { $this->entity->setPermissions(['dashboard.index' => true, 'dashboard.show' => false]); $this->assertTrue($this->entity->hasAccess('dashboard.index')); $this->assertFalse($this->entity->hasAccess('dashboard.show')); }
public function test_deny_access_when_permission_does_not_exist() { $this->assertFalse($this->entity->hasAccess('non-existing')); $this->assertFalse($this->role->hasAccess('non-existing')); }