mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Expand test coverage.
This commit is contained in:
@@ -284,7 +284,7 @@ class AccountController extends Controller
|
||||
$currencyId = intval($account->getMeta('currency_id'));
|
||||
$currency = $currencyRepos->find($currencyId);
|
||||
if (0 === $currencyId) {
|
||||
$currency = app('amount')->getDefaultCurrency();
|
||||
$currency = app('amount')->getDefaultCurrency(); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
// prep for "all" view.
|
||||
@@ -348,8 +348,10 @@ class AccountController extends Controller
|
||||
// update preferences if necessary:
|
||||
$frontPage = Preferences::get('frontPageAccounts', [])->data;
|
||||
if (count($frontPage) > 0 && AccountType::ASSET === $account->accountType->type) {
|
||||
// @codeCoverageIgnoreStart
|
||||
$frontPage[] = $account->id;
|
||||
Preferences::set('frontPageAccounts', $frontPage);
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
if (1 === intval($request->get('create_another'))) {
|
||||
|
@@ -137,7 +137,7 @@ class LinkController extends Controller
|
||||
|
||||
// put previous url in session if not redirect from store (not "return_to_edit").
|
||||
if (true !== session('link_types.edit.fromUpdate')) {
|
||||
$this->rememberPreviousUri('link_types.edit.uri');
|
||||
$this->rememberPreviousUri('link_types.edit.uri'); // @codeCoverageIgnore
|
||||
}
|
||||
$request->session()->forget('link_types.edit.fromUpdate');
|
||||
|
||||
@@ -197,7 +197,7 @@ class LinkController extends Controller
|
||||
// set value so create routine will not overwrite URL:
|
||||
$request->session()->put('link_types.create.fromStore', true);
|
||||
|
||||
return redirect(route('link_types.create', [$request->input('what')]))->withInput();
|
||||
return redirect(route('admin.links.create'))->withInput();
|
||||
}
|
||||
|
||||
// redirect to previous URL.
|
||||
|
Reference in New Issue
Block a user