mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-27 03:10:32 -06:00
Test for opening balance.
This commit is contained in:
parent
a43238360c
commit
64ce53ac30
@ -382,7 +382,8 @@ class TransactionJournal implements TransactionJournalInterface, CUDInterface, C
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case (isset($model['from']) && isset($model['to'])):
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new FireflyException('Cannot validate accounts for transaction journal.');
|
throw new FireflyException('Cannot validate accounts for transaction journal.');
|
||||||
break;
|
break;
|
||||||
|
@ -114,6 +114,21 @@ class AccountControllerCest
|
|||||||
$I->seeRecord('accounts', ['name' => 'New through tests.']);
|
$I->seeRecord('accounts', ['name' => 'New through tests.']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param FunctionalTester $I
|
||||||
|
*/
|
||||||
|
public function storeOpeningBalance(FunctionalTester $I)
|
||||||
|
{
|
||||||
|
$I->amOnPage('/accounts/create/asset');
|
||||||
|
$I->wantTo('store a new asset account with a balance');
|
||||||
|
$I->see('Create a new asset account');
|
||||||
|
$I->submitForm('#store', ['name' => 'New through tests with balance.',
|
||||||
|
'openingBalance' => 10,
|
||||||
|
'openingBalanceDate' => '2015-01-01',
|
||||||
|
'what' => 'asset', 'account_role' => 'defaultExpense', 'post_submit_action' => 'store']);
|
||||||
|
$I->seeRecord('accounts', ['name' => 'New through tests with balance.']);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param FunctionalTester $I
|
* @param FunctionalTester $I
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user