diff --git a/tests/Feature/LocationApiTest.php b/tests/Feature/LocationApiTest.php index b2f8a2a1e3..a0a6b1f333 100644 --- a/tests/Feature/LocationApiTest.php +++ b/tests/Feature/LocationApiTest.php @@ -302,6 +302,23 @@ class LocationApiTest extends TestCase 'X-API-TOKEN' => $this->token, ])->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); $arr = $response->json();