mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-13 06:47:46 -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();
|
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'))
|
$this->getJson(route('api.users.selectlist'))
|
||||||
->assertOk()
|
->assertOk()
|
||||||
->assertJsonStructure([
|
->assertJsonStructure([
|
||||||
|
@ -27,7 +29,7 @@ class UsersForSelectListTest extends TestCase
|
||||||
'page',
|
'page',
|
||||||
'page_count',
|
'page_count',
|
||||||
])
|
])
|
||||||
->assertJson(fn(AssertableJson $json) => $json->has('results', 4)->etc());
|
->assertJson(fn(AssertableJson $json) => $json->has('results', $userCount)->etc());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled()
|
public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled()
|
||||||
|
|
Loading…
Reference in a new issue