Catch for paypal script not loading

This commit is contained in:
David Bomba 2023-12-12 11:37:49 +11:00
parent 600a4646b7
commit 46eb525189

View File

@ -445,17 +445,11 @@ class SchedulerTest extends TestCase
]; ];
$response = false; $response = false;
$response = $this->withHeaders([
try { 'X-API-SECRET' => config('ninja.api_secret'),
$response = $this->withHeaders([ 'X-API-TOKEN' => $this->token,
'X-API-SECRET' => config('ninja.api_secret'), ])->postJson('/api/v1/task_schedulers', $data);
'X-API-TOKEN' => $this->token,
])->postJson('/api/v1/task_schedulers', $data);
} catch (ValidationException $e) {
$message = json_decode($e->validator->getMessageBag(), 1);
nlog($message);
}
$response->assertStatus(200); $response->assertStatus(200);
$data = $response->json(); $data = $response->json();
@ -509,19 +503,13 @@ class SchedulerTest extends TestCase
$response = false; $response = false;
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, ])->postJson('/api/v1/task_schedulers', $data);
])->postJson('/api/v1/task_schedulers', $data);
} catch (ValidationException $e) {
$message = json_decode($e->validator->getMessageBag(), 1);
nlog($message);
}
$response->assertStatus(200); $response->assertStatus(200);
$data = [ $data = [
'name' => 'A single Client', 'name' => 'A single Client',
'frequency_id' => RecurringInvoice::FREQUENCY_MONTHLY, 'frequency_id' => RecurringInvoice::FREQUENCY_MONTHLY,