mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Tests for payments (#3277)
This commit is contained in:
parent
79c57aa8da
commit
84461858f2
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user