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

@@ -54,6 +54,35 @@ void main() {
expect(model.slug, 'consultant-1');
expect(model.totalScores, 450);
});
test('toJson serializes FeedConsultantModel correctly', () {
const model = FeedConsultantModel(
slug: 'consultant-1',
name: 'Consultant Name',
description: 'Test description',
ratingPlace: 1,
totalScores: 450,
photo: 'https://example.com/photo.jpg',
badges: [
BadgeModel(
id: 1,
title: 'Badge 1',
description: 'Description',
image: 'https://example.com/badge1.jpg',
type: 'type',
),
],
);
final json = model.toJson();
expect(json['slug'], 'consultant-1');
expect(json['name'], 'Consultant Name');
expect(json['additional_info'], 'Test description');
expect(json['rating_place'], 1);
expect(json['total_scores'], 450);
expect(json.containsKey('badges'), isTrue);
});
});
group('FeedConsultantPaginationModel', () {