Exemplo n.º 1
0
 public function testAssignUserToNewGroup()
 {
     $this->testCreationNewGroup();
     $user = User::first();
     $group = $this->tester->grabRecord('groups', ['name' => 'Grupa AA']);
     DB::table('group_users')->insert(['user_id' => $user->id, 'group_id' => $group->id]);
     $this->testCreationNewPermission();
     $permission = $this->tester->grabRecord('permissions', ['name' => 'do-smth']);
     $this->tester->seeRecord('group_permissions', ['group_id' => $group->id, 'permission_id' => $permission->id, 'value' => false]);
 }
Exemplo n.º 2
0
 public function _before(FunctionalTester $I)
 {
     $this->user = User::first();
     $I->amLoggedAs($this->user);
 }