23 lines
512 B
Dart
23 lines
512 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:kooltap/utils/money.dart';
|
|
|
|
void main() {
|
|
group('Cents.asEuro', () {
|
|
test('formats cents in Belgian notation', () {
|
|
expect(1234.asEuro, '€ 12,34');
|
|
});
|
|
|
|
test('formats zero', () {
|
|
expect(0.asEuro, '€ 0,00');
|
|
});
|
|
|
|
test('formats whole euros with two decimals', () {
|
|
expect(500.asEuro, '€ 5,00');
|
|
});
|
|
|
|
test('groups thousands', () {
|
|
expect(123456.asEuro, '€ 1.234,56');
|
|
});
|
|
});
|
|
}
|