Updated tests

This commit is contained in:
James Cole
2017-03-05 11:18:34 +01:00
parent 884d6c59a2
commit e5a2e1a8c7
8 changed files with 318 additions and 111 deletions

View File

@@ -409,8 +409,6 @@ class AccountController extends Controller
$cache->addProperty($account->id);
if ($cache->has()) {
Log::debug('Entries are cached, return cache.');
return $cache->get(); // @codeCoverageIgnore
}

View File

@@ -792,10 +792,15 @@ Breadcrumbs::register(
Breadcrumbs::register(
'transactions.mass.edit', function (BreadCrumbGenerator $breadcrumbs, Collection $journals) {
$journalIds = $journals->pluck('id')->toArray();
$what = strtolower($journals->first()->transactionType->type);
$breadcrumbs->parent('transactions.index', $what);
$breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.edit', $journalIds));
if($journals->count() > 0) {
$journalIds = $journals->pluck('id')->toArray();
$what = strtolower($journals->first()->transactionType->type);
$breadcrumbs->parent('transactions.index', $what);
$breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.edit', $journalIds));
return;
}
$breadcrumbs->parent('index');
}
);