Fix tests

This commit is contained in:
James Cole
2019-08-04 11:12:24 +02:00
parent 62b5cf04ad
commit 2147caf3ef
5 changed files with 33 additions and 10 deletions

View File

@@ -58,8 +58,10 @@ class ConvertToTransferTest extends TestCase
public function testActDeposit(): void
{
$deposit = $this->getRandomDeposit();
/** @var Account $asset */
$asset = $this->getRandomAsset();
// make sure that $asset is not the destination account of $deposit:
$forbiddenId = (int)$deposit->transactions()->where('amount', '>', 0)->first()->account_id;
$asset = $this->getRandomAsset($forbiddenId);
// mock used stuff:
$accountRepos = $this->mock(AccountRepositoryInterface::class);