mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Update test case
This commit is contained in:
parent
a0e547c7fb
commit
16e3416225
|
@ -15,9 +15,11 @@ class UsersForSelectListTest extends TestCase
|
|||
{
|
||||
Setting::factory()->create();
|
||||
|
||||
User::factory()->count(3)->create();
|
||||
$users = User::factory()->superuser()->count(3)->create();
|
||||
|
||||
Passport::actingAs(User::factory()->firstAdmin()->create());
|
||||
$userCount = User::count();
|
||||
|
||||
Passport::actingAs($users->first());
|
||||
$this->getJson(route('api.users.selectlist'))
|
||||
->assertOk()
|
||||
->assertJsonStructure([
|
||||
|
@ -27,7 +29,7 @@ class UsersForSelectListTest extends TestCase
|
|||
'page',
|
||||
'page_count',
|
||||
])
|
||||
->assertJson(fn(AssertableJson $json) => $json->has('results', 4)->etc());
|
||||
->assertJson(fn(AssertableJson $json) => $json->has('results', $userCount)->etc());
|
||||
}
|
||||
|
||||
public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled()
|
||||
|
|
Loading…
Reference in a new issue