Update user notifications
This commit is contained in:
parent
2e6f6585fc
commit
539b2c660e
|
|
@ -12,8 +12,9 @@
|
|||
|
||||
namespace App\DataMapper;
|
||||
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use stdClass;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* CompanySettings.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use Tests\TestCase;
|
|||
class InvitationTest extends TestCase
|
||||
{
|
||||
use MockAccountData;
|
||||
use DatabaseTransactions;
|
||||
// use DatabaseTransactions;
|
||||
use MakesHash;
|
||||
|
||||
protected function setUp(): void
|
||||
|
|
@ -57,10 +57,13 @@ class InvitationTest extends TestCase
|
|||
|
||||
$response = null;
|
||||
|
||||
$data = $this->invoice->toArray();
|
||||
unset($data['hashed_id']);
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->putJson('/api/v1/invoices/'.$this->encodePrimaryKey($this->invoice->id), $this->invoice->toArray());
|
||||
])->putJson('/api/v1/invoices/'.$this->invoice->hashed_id, $this->invoice->toArray());
|
||||
|
||||
$response->assertStatus(200);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ use Tests\TestCase;
|
|||
class InvoiceMarkPaidTest extends TestCase
|
||||
{
|
||||
use MockAccountData;
|
||||
use DatabaseTransactions;
|
||||
// use DatabaseTransactions;
|
||||
|
||||
public $invoice;
|
||||
|
||||
|
|
@ -82,7 +82,6 @@ class InvoiceMarkPaidTest extends TestCase
|
|||
|
||||
$response->assertStatus(200);
|
||||
|
||||
|
||||
$this->assertEquals(0, $response->json('data.balance'));
|
||||
$this->assertEquals(10, $response->json('data.paid_to_date'));
|
||||
$this->assertEquals(4, $response->json('data.status_id'));
|
||||
|
|
@ -94,6 +93,8 @@ class InvoiceMarkPaidTest extends TestCase
|
|||
$this->assertEquals(4, $i->status_id);
|
||||
|
||||
|
||||
$c->forceDelete();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -158,6 +159,7 @@ class InvoiceMarkPaidTest extends TestCase
|
|||
$this->assertEquals(4, $i->status_id);
|
||||
|
||||
|
||||
$c->forceDelete();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue