From a2e47d19fcd12d6759559811e52323d07b504547 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 2 Feb 2023 13:47:00 -0800 Subject: [PATCH] Scaffold tests for user select list api and begin to implemenet --- .../Api/Users/UsersForSelectListTest.php | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/Feature/Api/Users/UsersForSelectListTest.php diff --git a/tests/Feature/Api/Users/UsersForSelectListTest.php b/tests/Feature/Api/Users/UsersForSelectListTest.php new file mode 100644 index 0000000000..fb1dde2909 --- /dev/null +++ b/tests/Feature/Api/Users/UsersForSelectListTest.php @@ -0,0 +1,50 @@ +create(); + + $actor = User::factory()->firstAdmin()->create(); + User::factory()->count(3)->create(); + + Passport::actingAs($actor); + $response = $this->getJson(route('api.users.selectlist')); + $response->assertOk(); + + $response->assertJsonStructure([ + 'results', + 'pagination', + 'total_count', + 'page', + 'page_count', + ]); + + $response->assertJson(fn(AssertableJson $json) => $json->has('results', 4)->etc()); + } + + public function testUsersScopedToCompanyWhenMultipleFullCompanySupportEnabled() + { + $this->markTestIncomplete(); + + } + + public function testUsersScopedToCompanyDuringSearchWhenMultipleFullCompanySupportEnabled() + { + $this->markTestIncomplete(); + + + } +}