clean tests & other things
This commit is contained in:
@@ -59,4 +59,15 @@ class UserAuthTest extends TestCase
|
||||
|
||||
$this->assertCount(1, User::all());
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function an_admin_can_fetch_all_users()
|
||||
{
|
||||
$this->actingAs($user = factory(User::class)->create(['role' => 2]), 'api');
|
||||
$anotherUser = factory(User::class)->create();
|
||||
|
||||
$response = $this->get('/api/users')->assertStatus(Response::HTTP_OK);
|
||||
|
||||
$this->assertCount(2, User::all());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user