Some refactoring.

This commit is contained in:
James Cole
2014-12-30 18:44:58 +01:00
parent 94fcfacec4
commit 8c3ae40de1
26 changed files with 327 additions and 329 deletions

View File

@@ -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');
}
}