From 7f634a0210e58b4683e2335d9c451dfd4efbfd48 Mon Sep 17 00:00:00 2001 From: Sebastian Fix Date: Mon, 1 Dec 2025 12:52:18 +0100 Subject: [PATCH] wip --- tests/Unit/Endpoint/Api/V1/ClientEndpointTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Unit/Endpoint/Api/V1/ClientEndpointTest.php b/tests/Unit/Endpoint/Api/V1/ClientEndpointTest.php index 9a25bb45..7d4ed0af 100644 --- a/tests/Unit/Endpoint/Api/V1/ClientEndpointTest.php +++ b/tests/Unit/Endpoint/Api/V1/ClientEndpointTest.php @@ -82,6 +82,11 @@ public function test_index_endpoint_returns_list_of_clients_assigned_to_employee // Assert $response->assertStatus(200); $response->assertJsonCount(2, 'data'); + $clients = Client::query() + ->whereBelongsTo($data->organization, 'organization') + ->visibleByEmployee($data->user) + ->orderBy('name') + ->get(); $response->assertJson(fn (AssertableJson $json) => $json ->has('data') ->has('links')