Added test

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-03 22:12:06 +01:00
parent aefaabdb1a
commit 17a6335d13

View file

@ -144,4 +144,15 @@ class UserSearchTest extends TestCase
'User index contains unexpected user from another company'
);
}
public function testUsersIndexWhenInvalidSortFieldIsPassed()
{
$this->actingAsForApi(User::factory()->viewUsers()->create())
->getJson(route('api.users.index', [
'sort' => 'assets',
]))
->assertOk()
->assertStatus(200)
->json();
}
}