mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some refactoring.
This commit is contained in:
@@ -211,7 +211,7 @@ class PiggyBankControllerCest
|
||||
'remind_me' => 0,
|
||||
'order' => 3,
|
||||
'account_id' => 1,
|
||||
'targetamount' => 1000]
|
||||
'targetamount' => 1000]
|
||||
);
|
||||
$I->see('Piggy bank "Some new piggy bank" stored.');
|
||||
}
|
||||
@@ -225,14 +225,14 @@ class PiggyBankControllerCest
|
||||
$I->amOnPage('/piggy_banks/create');
|
||||
$I->see('Create new piggy bank');
|
||||
$I->submitForm(
|
||||
'#store', ['name' => null,
|
||||
'rep_every' => 0,
|
||||
'reminder_skip' => 0,
|
||||
'remind_me' => 0,
|
||||
'order' => 3,
|
||||
'account_id' => 1,
|
||||
'#store', ['name' => null,
|
||||
'rep_every' => 0,
|
||||
'reminder_skip' => 0,
|
||||
'remind_me' => 0,
|
||||
'order' => 3,
|
||||
'account_id' => 1,
|
||||
'post_submit_action' => 'store',
|
||||
'targetamount' => 1000]
|
||||
'targetamount' => 1000]
|
||||
);
|
||||
$I->see('The name field is required.');
|
||||
}
|
||||
@@ -281,29 +281,6 @@ class PiggyBankControllerCest
|
||||
$I->see('Piggy bank "Updated camera" updated.');
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function updateValidateOnly(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('validate a piggy bank');
|
||||
$I->amOnPage('/piggy_banks/edit/1');
|
||||
$I->see('Edit piggy bank "New camera"');
|
||||
$I->submitForm(
|
||||
'#update', [
|
||||
'name' => 'Updated camera',
|
||||
'account_id' => 2,
|
||||
'targetamount' => 2000,
|
||||
'targetdate' => '',
|
||||
'reminder' => 'week',
|
||||
'post_submit_action' => 'validate_only',
|
||||
]
|
||||
);
|
||||
$I->see('Updated camera');
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -329,4 +306,27 @@ class PiggyBankControllerCest
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function updateValidateOnly(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('validate a piggy bank');
|
||||
$I->amOnPage('/piggy_banks/edit/1');
|
||||
$I->see('Edit piggy bank "New camera"');
|
||||
$I->submitForm(
|
||||
'#update', [
|
||||
'name' => 'Updated camera',
|
||||
'account_id' => 2,
|
||||
'targetamount' => 2000,
|
||||
'targetdate' => '',
|
||||
'reminder' => 'week',
|
||||
'post_submit_action' => 'validate_only',
|
||||
]
|
||||
);
|
||||
$I->see('Updated camera');
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user