mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for tests
This commit is contained in:
parent
9acced72e1
commit
73c09d30e3
@ -52,15 +52,11 @@ class UpdateCompanyUserTest extends TestCase
|
|||||||
|
|
||||||
$response = null;
|
$response = null;
|
||||||
|
|
||||||
try {
|
$response = $this->withHeaders([
|
||||||
$response = $this->withHeaders([
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-TOKEN' => $this->token,
|
||||||
'X-API-TOKEN' => $this->token,
|
])->putJson('/api/v1/company_users/'.$this->encodePrimaryKey($this->user->id).'/preferences?include=company_user', $settings);
|
||||||
])->put('/api/v1/company_users/'.$this->encodePrimaryKey($this->user->id).'/preferences?include=company_user', $settings);
|
|
||||||
} catch (ValidationException $e) {
|
|
||||||
$message = json_decode($e->validator->getMessageBag(), 1);
|
|
||||||
$this->assertNotNull($message);
|
|
||||||
}
|
|
||||||
|
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
|
|
||||||
@ -78,15 +74,10 @@ class UpdateCompanyUserTest extends TestCase
|
|||||||
|
|
||||||
$response = null;
|
$response = null;
|
||||||
|
|
||||||
try {
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-TOKEN' => $this->token,
|
'X-API-TOKEN' => $this->token,
|
||||||
])->put('/api/v1/company_users/'.$this->encodePrimaryKey($this->user->id).'/preferences?include=company_user', $settings);
|
])->putJson('/api/v1/company_users/'.$this->encodePrimaryKey($this->user->id).'/preferences?include=company_user', $settings);
|
||||||
} catch (ValidationException $e) {
|
|
||||||
$message = json_decode($e->validator->getMessageBag(), 1);
|
|
||||||
$this->assertNotNull($message);
|
|
||||||
}
|
|
||||||
|
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
|
|
||||||
@ -114,15 +105,10 @@ class UpdateCompanyUserTest extends TestCase
|
|||||||
|
|
||||||
$response = null;
|
$response = null;
|
||||||
|
|
||||||
try {
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-TOKEN' => $this->token,
|
'X-API-TOKEN' => $this->token,
|
||||||
])->put('/api/v1/company_users/'.$this->encodePrimaryKey($this->user->id), $user);
|
])->putJson('/api/v1/company_users/'.$this->encodePrimaryKey($this->user->id), $user);
|
||||||
} catch (ValidationException $e) {
|
|
||||||
$message = json_decode($e->validator->getMessageBag(), 1);
|
|
||||||
$this->assertNotNull($message);
|
|
||||||
}
|
|
||||||
|
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user