Expanded test coverage.

This commit is contained in:
James Cole
2017-03-24 11:07:38 +01:00
parent 398cf0b312
commit 222b3008d5
14 changed files with 651 additions and 121 deletions

View File

@@ -9,7 +9,7 @@
* See the LICENSE file for details.
*/
declare(strict_types = 1);
declare(strict_types=1);
namespace FireflyIII\Http\Controllers;
@@ -217,10 +217,11 @@ class RuleGroupController extends Controller
Preferences::mark();
if (intval($request->get('create_another')) === 1) {
// set value so create routine will not overwrite URL:
// @codeCoverageIgnoreStart
Session::put('rule-groups.create.fromStore', true);
return redirect(route('rule-groups.create'))->withInput();
// @codeCoverageIgnoreEnd
}
return redirect($this->getPreviousUri('rule-groups.create.uri'));
@@ -261,10 +262,11 @@ class RuleGroupController extends Controller
Preferences::mark();
if (intval($request->get('return_to_edit')) === 1) {
// set value so edit routine will not overwrite URL:
// @codeCoverageIgnoreStart
Session::put('rule-groups.edit.fromUpdate', true);
return redirect(route('rule-groups.edit', [$ruleGroup->id]))->withInput(['return_to_edit' => 1]);
// @codeCoverageIgnoreEnd
}
// redirect to previous URL.