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

@@ -80,5 +80,35 @@ void main() {
expect(model.weight, 80);
expect(model.height, 175);
});
test('toJson serializes RegistrationModel correctly', () {
final model = RegistrationModel(
firstName: 'John',
lastName: 'Doe',
email: 'john.doe@example.com',
phone: '+1234567890',
gender: 'male',
password: 'password123',
confirmPassword: 'password123',
weight: 75,
height: 180,
activityCoefficient: 1.5,
birthday: '1990-01-01',
);
final json = model.toJson();
expect(json['first_name'], 'John');
expect(json['last_name'], 'Doe');
expect(json['email'], 'john.doe@example.com');
expect(json['phone'], '+1234567890');
expect(json['gender'], 'male');
expect(json['password'], 'password123');
expect(json['password_confirmation'], 'password123');
expect(json['weight'], 75);
expect(json['height'], 180);
expect(json['activity_coefficient'], 1.5);
expect(json['birthdate'], '1990-01-01');
});
});
}