ing connected, makign some features
This commit is contained in:
@@ -41,19 +41,21 @@ void main() {
|
||||
expect(start.state, 'abc');
|
||||
});
|
||||
|
||||
test('BankTransaction match keys support auto-category and notes', () {
|
||||
test('BankTransaction match keys support auto-label and notes', () {
|
||||
final tx = BankTransaction.fromJson({
|
||||
'date': '2026-09-01',
|
||||
'description': 'Coffee Shop',
|
||||
'description':
|
||||
'BCK*AH CAMPUS DIEMEN ZUID NLD Pasvolgnr: 001 Transactie: C00338123',
|
||||
'amount': -3.5,
|
||||
'currency': 'EUR',
|
||||
'pending': false,
|
||||
});
|
||||
expect(tx.descriptionKey, 'coffee shop');
|
||||
expect(tx.exactKey, contains('coffee shop'));
|
||||
expect(tx.descriptionKey, contains('pasvolgnr'));
|
||||
expect(tx.merchantKey, contains('ah campus diemen'));
|
||||
expect(tx.merchantKey.contains('pasvolgnr'), isFalse);
|
||||
expect(tx.exactKey, contains('-3.5'));
|
||||
expect(formatMoney(tx.amount, tx.currency), contains('EUR'));
|
||||
expect(TxCategory.groceries.label, 'Groceries');
|
||||
expect(kBuiltinLabels.first.name, 'Groceries');
|
||||
});
|
||||
|
||||
test('look-ahead applies monthly recurring amounts', () {
|
||||
@@ -63,14 +65,14 @@ void main() {
|
||||
amount: 2000,
|
||||
currency: 'EUR',
|
||||
dayOfMonth: 25,
|
||||
category: TxCategory.salary,
|
||||
labelIds: ['salary'],
|
||||
),
|
||||
const RecurringItem(
|
||||
description: 'Rent',
|
||||
amount: -900,
|
||||
currency: 'EUR',
|
||||
dayOfMonth: 1,
|
||||
category: TxCategory.mortgage,
|
||||
labelIds: ['mortgage'],
|
||||
),
|
||||
];
|
||||
final from = DateTime(2026, 9, 6);
|
||||
|
||||
Reference in New Issue
Block a user