Improve test coverage.

This commit is contained in:
James Cole
2018-03-03 10:15:39 +01:00
parent 9475fef8f6
commit 99d116f4ce
5 changed files with 187 additions and 16 deletions

View File

@@ -2394,7 +2394,7 @@ class TransactionControllerTest extends TestCase
];
do {
/** @var TransactionJournal $deposit */
$deposit = $this->user()->transactionJournals()->where('transaction_type_id', 2)->first();
$deposit = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 2)->first();
$count = $deposit->transactions()->count();
} while ($count !== 2);
@@ -2431,7 +2431,7 @@ class TransactionControllerTest extends TestCase
];
do {
/** @var TransactionJournal $withdrawal */
$withdrawal = $this->user()->transactionJournals()->where('transaction_type_id', 1)->first();
$withdrawal = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 1)->first();
$count = $withdrawal->transactions()->count();
} while ($count !== 2);