Expanded test coverage.

This commit is contained in:
James Cole
2015-02-01 12:07:06 +01:00
parent 13d3d40376
commit 6b0a711395
9 changed files with 34 additions and 42 deletions

View File

@@ -69,6 +69,21 @@ class TransactionControllerCest
}
public function destroyTransferWithEvent(FunctionalTester $I)
{
// get withdrawal transaction type id:
$row = DB::table('piggy_bank_events')->whereNotNull('transaction_journal_id')->first();
$journalId = $row->transaction_journal_id;
$journal = TransactionJournal::find($journalId);
$I->wantTo('destroy a transfer connected to a piggy bank');
$I->amOnPage('/transaction/delete/' . $journal->id);
$I->submitForm('#destroy', []);
$I->see('Transaction "' . $journal->description . '" destroyed.');
}
public function destroyWithdrawal(FunctionalTester $I)
{
// get withdrawal transaction type id: