Files
eatvio_app/test/features/diary/models/create_day_model_test.dart

24 lines
600 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:eatvio_app/features/diary/models/create_day_model.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('CreateDayModel', () {
test('создает CreateDayModel с правильными значениями', () {
final model = CreateDayModel(day: '2024-01-01');
expect(model.day, '2024-01-01');
});
test('fromJson создает CreateDayModel из JSON', () {
final json = {
'day': '2024-01-01',
};
final model = CreateDayModel.fromJson(json);
expect(model.day, '2024-01-01');
});
});
}