feat(tests): updated tests coverage to 66.5%

This commit is contained in:
misha
2026-01-14 18:47:11 +03:00
parent 497ff19cfa
commit 13ccf56df0
102 changed files with 10146 additions and 379 deletions

View File

@@ -0,0 +1,29 @@
import 'package:eatvio_app/features/create_plan/models/plan_slug_model.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('PlanSlugModel', () {
test('fromJson parses slug correctly', () {
final json = {'slug': 'test-plan-slug'};
final model = PlanSlugModel.fromJson(json);
expect(model.slug, 'test-plan-slug');
});
test('toJson serializes slug correctly', () {
final model = PlanSlugModel(slug: 'test-plan-slug');
final json = model.toJson();
expect(json['slug'], 'test-plan-slug');
});
test('creates instance with slug', () {
final model = PlanSlugModel(slug: 'another-slug');
expect(model.slug, 'another-slug');
});
});
}