diff --git a/routes/api.php b/routes/api.php index 8117be9af0e3..f9eab0ad1423 100644 --- a/routes/api.php +++ b/routes/api.php @@ -32,7 +32,7 @@ Route::group(['api_secret_check', 'email_db'], function () { }); -Route::group(['middleware' => ['api_db', 'api_secret_check', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () { +Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () { Route::resource('activities', 'ActivityController'); // name = (clients. index / create / show / update / destroy / edit diff --git a/tests/Feature/PaymentTest.php b/tests/Feature/PaymentTest.php index 18805cccfa61..7c5bd1d31af6 100644 --- a/tests/Feature/PaymentTest.php +++ b/tests/Feature/PaymentTest.php @@ -1073,6 +1073,14 @@ class PaymentTest extends TestCase } $response->assertStatus(200); + + $arr = $response->json(); + $payment_id = $arr['data']['id']; + $payment = Payment::whereId($this->decodePrimaryKey($payment_id))->first(); + + $this->assertEquals(round($payment->amount,2), $this->invoice->amount); + + $this->assertEquals(round($payment->applied,2), $this->invoice->amount); } }