Improve test coverage.

This commit is contained in:
James Cole
2018-12-10 21:45:44 +01:00
parent 5313652d7a
commit 159fffef2e
26 changed files with 2335 additions and 347 deletions

View File

@@ -249,7 +249,7 @@ class RuleController extends Controller
foreach ($accountList as $accountId) {
Log::debug(sprintf('Searching for asset account with id "%s"', $accountId));
$account = $this->accountRepository->findNull((int)$accountId);
if (null !== $account && AccountType::ASSET === $account->accountType->type) {
if (null !== $account && $this->accountRepository->isAsset($account)) {
Log::debug(sprintf('Found account #%d ("%s") and its an asset account', $account->id, $account->name));
$accounts->push($account);
}