Files
fin-tracker/app/test/money_text_test.dart
T
Dmitry ce0966fca2 feat(app): Flutter-клиент — логин, дашборд, потоки, категории, транзакции, правила
Riverpod + go_router с auth-guard, NavigationRail на широком экране и bottom bar
на узком. Токены в flutter_secure_storage, на web access живёт в памяти.
Интерцептор подставляет токен и делает ровно один refresh на 401.

Деньги приходят строками и форматируются через Decimal: парсить их в double
значило бы терять копейки ровно там, где бэкенд их бережёт.
2026-09-18 13:44:09 +03:00

11 lines
420 B
Dart
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:fintracker_app/core/widgets/money_text.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('formats a decimal-string RUB amount with ru_RU grouping', () {
// intl's ru_RU locale data uses U+00A0 (NBSP) as both the group and
// currency separator, so the expected string is not plain ASCII spaces.
expect(MoneyText.format('1234.5', 'RUB'), '1 234,50 ₽');
});
}