/** @test */ public function it_gets_role() { $this->prepare(); $permission = Permission::with('role')->where('action_key', 'create')->where('entity_key', 'role')->where('role_key', 'SuperAdmin')->first(); $this->assertEquals('SuperAdmin', $permission->role->name); }
public function __construct() { $this->permissions = Permission::with('role')->get(); }