From f07905a0bc9ff30f18e747900b8c042af9df8348 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 18 Aug 2021 22:12:10 +1000 Subject: [PATCH] Minor fixes --- app/Listeners/Payment/PaymentNotification.php | 2 +- tests/Unit/InvitationTest.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Listeners/Payment/PaymentNotification.php b/app/Listeners/Payment/PaymentNotification.php index d1a7a7b94748..3c3ff8b8635b 100644 --- a/app/Listeners/Payment/PaymentNotification.php +++ b/app/Listeners/Payment/PaymentNotification.php @@ -100,7 +100,7 @@ class PaymentNotification implements ShouldQueue $currency_code = $client->getCurrencyCode(); if (Ninja::isHosted()) { - $item .= ' [R]'; + $item .= ' [R5]'; } $base = "v=1&tid={$analytics_id}&cid={$client->id}&cu={$currency_code}&ti={$entity_number}"; diff --git a/tests/Unit/InvitationTest.php b/tests/Unit/InvitationTest.php index 84ef07a31bf8..f5a0fbd01f5f 100644 --- a/tests/Unit/InvitationTest.php +++ b/tests/Unit/InvitationTest.php @@ -11,8 +11,10 @@ namespace Tests\Unit; use App\Factory\InvoiceInvitationFactory; +use App\Models\CompanyToken; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Routing\Middleware\ThrottleRequests; +use Illuminate\Validation\ValidationException; use Tests\MockAccountData; use Tests\TestCase; @@ -30,6 +32,9 @@ class InvitationTest extends TestCase $this->withoutMiddleware( ThrottleRequests::class ); + + $this->withoutExceptionHandling(); + } public function testInvitationSanity() @@ -54,9 +59,10 @@ class InvitationTest extends TestCase try { $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token, ])->put('/api/v1/invoices/'.$this->encodePrimaryKey($this->invoice->id), $this->invoice->toArray()); - } catch (\Exception $e) { + } catch (ValidationException $e) { nlog($e->getMessage()); }