mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-29 02:11:12 -06:00
Covered the final lines.
This commit is contained in:
parent
64311da4b4
commit
6d03ddadcc
@ -239,7 +239,7 @@ class TestContentSeeder extends Seeder
|
|||||||
'match' => 'huur,portaal',
|
'match' => 'huur,portaal',
|
||||||
'amount_min' => 500,
|
'amount_min' => 500,
|
||||||
'amount_max' => 700,
|
'amount_max' => 700,
|
||||||
'date' => '2014-01-12',
|
'date' => '2014-01-01',
|
||||||
'active' => 1,
|
'active' => 1,
|
||||||
'automatch' => 1,
|
'automatch' => 1,
|
||||||
'repeat_freq' => 'monthly',
|
'repeat_freq' => 'monthly',
|
||||||
@ -255,8 +255,8 @@ class TestContentSeeder extends Seeder
|
|||||||
'match' => 'no,match',
|
'match' => 'no,match',
|
||||||
'amount_min' => 500,
|
'amount_min' => 500,
|
||||||
'amount_max' => 700,
|
'amount_max' => 700,
|
||||||
'date' => '2014-01-12',
|
'date' => '2014-01-01',
|
||||||
'active' => 0,
|
'active' => 1,
|
||||||
'automatch' => 1,
|
'automatch' => 1,
|
||||||
'repeat_freq' => 'monthly',
|
'repeat_freq' => 'monthly',
|
||||||
'skip' => 0,
|
'skip' => 0,
|
||||||
|
@ -50,15 +50,15 @@ class HomeControllerCest
|
|||||||
*/
|
*/
|
||||||
public function indexWithPrefs(FunctionalTester $I)
|
public function indexWithPrefs(FunctionalTester $I)
|
||||||
{
|
{
|
||||||
$I->wantTo('see the home page of Firefly using pre-set accounts');
|
|
||||||
\Preference::whereName('frontPageAccounts')->delete();
|
\Preference::whereName('frontPageAccounts')->delete();
|
||||||
\Preference::create(
|
\Preference::create(
|
||||||
[
|
[
|
||||||
'user_id' => 1,
|
'user_id' => 1,
|
||||||
'name' => 'frontPageAccounts',
|
'name' => 'frontPageAccounts',
|
||||||
'data' => '[1,2]'
|
'data' => [1,2]
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
$I->wantTo('see the home page of Firefly using pre-set accounts');
|
||||||
$I->amOnPage('/');
|
$I->amOnPage('/');
|
||||||
$I->canSeeResponseCodeIs(200);
|
$I->canSeeResponseCodeIs(200);
|
||||||
$I->see('Firefly');
|
$I->see('Firefly');
|
||||||
|
@ -112,6 +112,56 @@ class RepeatedExpenseControllerCest
|
|||||||
$I->see('Piggy bank "TestRepeatedExpense" stored.');
|
$I->see('Piggy bank "TestRepeatedExpense" stored.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param FunctionalTester $I
|
||||||
|
*/
|
||||||
|
public function storeFail(FunctionalTester $I)
|
||||||
|
{
|
||||||
|
$I->wantTo('store a repeated expense and fail');
|
||||||
|
$I->amOnPage('/repeatedexpenses/create');
|
||||||
|
$I->submitForm(
|
||||||
|
'#store', [
|
||||||
|
'name' => '',
|
||||||
|
'account_id' => 1,
|
||||||
|
'targetamount' => 1000,
|
||||||
|
'targetdate' => Carbon::now()->format('Y-m-d'),
|
||||||
|
'rep_length' => 'month',
|
||||||
|
'rep_every' => 0,
|
||||||
|
'rep_times' => 0,
|
||||||
|
'remind_me' => 1,
|
||||||
|
'reminder' => 'month',
|
||||||
|
'post_submit_action' => 'store',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$I->see('Could not store repeated expense: The name field is required.');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param FunctionalTester $I
|
||||||
|
*/
|
||||||
|
public function storeAndReturn(FunctionalTester $I)
|
||||||
|
{
|
||||||
|
$I->wantTo('store a repeated expense and return');
|
||||||
|
$I->amOnPage('/repeatedexpenses/create');
|
||||||
|
$I->submitForm(
|
||||||
|
'#store', [
|
||||||
|
'name' => 'TestRepeatedExpense',
|
||||||
|
'account_id' => 1,
|
||||||
|
'targetamount' => 1000,
|
||||||
|
'targetdate' => Carbon::now()->format('Y-m-d'),
|
||||||
|
'rep_length' => 'month',
|
||||||
|
'rep_every' => 0,
|
||||||
|
'rep_times' => 0,
|
||||||
|
'remind_me' => 1,
|
||||||
|
'reminder' => 'month',
|
||||||
|
'post_submit_action' => 'create_another',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$I->see('Piggy bank "TestRepeatedExpense" stored.');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param FunctionalTester $I
|
* @param FunctionalTester $I
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user