Set tags on transactions #130

This commit is contained in:
Nabeel Shahzad
2018-03-06 06:40:49 -06:00
parent 453ca5b180
commit dad923489b
4 changed files with 187 additions and 159 deletions

View File

@@ -651,18 +651,16 @@ class FinanceTest extends TestCase
# Check that all the different transaction types are there
# test by the different groups that exist
$transaction_types = [
'Expense' => 1,
'Subfleet' => 1,
'Fares' => 3,
'Ground Handling' => 1,
'Pilot Pay' => 2, # debit on the airline, credit to the pilot
$transaction_tags = [
'expense' => 1,
'subfleet' => 1,
'fare' => 3,
'ground_handling' => 1,
'pilot_pay' => 2, # debit on the airline, credit to the pilot
];
foreach($transaction_types as $type => $count) {
$find = $transactions['transactions']
->where('transaction_group', $type);
foreach($transaction_tags as $type => $count) {
$find = $transactions['transactions']->where('tags', $type);
$this->assertEquals($count, $find->count());
}
}