prepareDatabase([ 'users' => [ $this->adminUser(), ], 'groups' => [ $this->adminGroup(), ], 'group_user' => [ ['user_id' => 1, 'group_id' => 1], ], ]); } /** * @test */ public function disallows_index_for_guest() { $response = $this->callWith(); $this->assertEquals(401, $response->getStatusCode()); } /** * @test */ public function shows_index_for_admin() { $this->actor = User::find(1); $response = $this->callWith(); $this->assertEquals(200, $response->getStatusCode()); } }