More tests! Yay!

This commit is contained in:
James Cole
2014-12-25 00:42:31 +01:00
parent 18c1223c7b
commit ce27e97b92
8 changed files with 208 additions and 108 deletions

View File

@@ -52,6 +52,7 @@ class PiggyBankControllerCest
$I->wantTo('delete a piggy bank');
$I->amOnPage('/piggy_banks/delete/1');
$I->see('Delete "New camera"');
}
/**
@@ -64,6 +65,7 @@ class PiggyBankControllerCest
$I->see('Delete "New camera"');
$I->submitForm('#destroy', []);
$I->see('Piggy bank "New camera" deleted.');
}
/**
@@ -242,13 +244,13 @@ class PiggyBankControllerCest
$I->see('Edit piggy bank "New camera"');
$I->submitForm(
'#update', [
'name' => 'Updated camera',
'account_id' => 2,
'targetamount' => 2000,
'targetdate' => '',
'reminder' => 'week',
'post_submit_action' => 'update',
]
'name' => 'Updated camera',
'account_id' => 2,
'targetamount' => 2000,
'targetdate' => '',
'reminder' => 'week',
'post_submit_action' => 'update',
]
);
$I->see('Piggy bank "Updated camera" updated.');
@@ -311,13 +313,13 @@ class PiggyBankControllerCest
$I->see('Edit piggy bank "New camera"');
$I->submitForm(
'#update', [
'name' => '',
'account_id' => 2,
'targetamount' => 2000,
'targetdate' => '',
'reminder' => 'week',
'post_submit_action' => 'update',
]
'name' => '',
'account_id' => 2,
'targetamount' => 2000,
'targetdate' => '',
'reminder' => 'week',
'post_submit_action' => 'update',
]
);
$I->see('Name is too short');
$I->seeInDatabase('piggy_banks', ['name' => 'New camera']);