mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Additional tests for System Logs
This commit is contained in:
parent
21f1469499
commit
2c7c60f985
@ -87,6 +87,12 @@ class InvoiceEmailTest extends TestCase
|
||||
|
||||
$this->assertEquals('invoice', $arr[0]['entity_type']);
|
||||
|
||||
$count = SystemLog::where('client_id', $this->client->id)
|
||||
->where('category_id', SystemLog::CATEGORY_MAIL)
|
||||
->orderBy('id', 'DESC')
|
||||
->count();
|
||||
|
||||
$this->assertEquals(1, $count);
|
||||
}
|
||||
|
||||
public function testEntityEmailHistory()
|
||||
@ -134,6 +140,13 @@ class InvoiceEmailTest extends TestCase
|
||||
$this->assertEquals('invoice', $arr[0]['entity_type']);
|
||||
$this->assertEquals($this->invoice->hashed_id, $arr[0]['entity_id']);
|
||||
|
||||
$count = SystemLog::where('company_id', $this->company->id)
|
||||
->where('category_id', SystemLog::CATEGORY_MAIL)
|
||||
->whereJsonContains('log->history->entity_id', $this->invoice->hashed_id)
|
||||
->count();
|
||||
|
||||
$this->assertEquals(1, $count);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user