mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-23 09:26:29 -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;
|
||||
|
||||
case (isset($model['from']) && isset($model['to'])):
|
||||
break;
|
||||
default:
|
||||
throw new FireflyException('Cannot validate accounts for transaction journal.');
|
||||
break;
|
||||
|
@ -114,6 +114,21 @@ class AccountControllerCest
|
||||
$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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user