Minor fixes for test scenario

This commit is contained in:
David Bomba 2025-03-01 07:48:44 +11:00
parent 4ee15c3142
commit df9595e292
1 changed files with 17 additions and 0 deletions

View File

@ -302,6 +302,23 @@ class LocationApiTest extends TestCase
'X-API-TOKEN' => $this->token, 'X-API-TOKEN' => $this->token,
])->postJson('/api/v1/locations', $data); ])->postJson('/api/v1/locations', $data);
$response->assertStatus(422);
$data = [
'name' => 'Test Location',
'address1' => '123 Test St',
'address2' => 'Suite 100',
'city' => 'Test City',
'state' => 'TS',
'postal_code' => '12345',
'country_id' => '840', // USA
'client_id' => $this->client->id,
];
$response = $this->withHeaders([
'X-API-TOKEN' => $this->token,
])->postJson('/api/v1/locations', $data);
$response->assertStatus(200); $response->assertStatus(200);
$arr = $response->json(); $arr = $response->json();