mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 10:47:00 +00:00 
			
		
		
		
	Test for opening balance.
This commit is contained in:
		| @@ -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 | ||||
|      */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user