Minor fixes for test scenario
This commit is contained in:
parent
4ee15c3142
commit
df9595e292
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue