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/auth/models/token_model.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('TokenModel', () {
test('fromJson parses token correctly', () {
final json = {'token': 'test-token-12345'};
final model = TokenModel.fromJson(json);
expect(model.token, 'test-token-12345');
});
test('toJson serializes token correctly', () {
const model = TokenModel(token: 'test-token-12345');
final json = model.toJson();
expect(json['token'], 'test-token-12345');
});
test('creates instance with token', () {
const model = TokenModel(token: 'another-token');
expect(model.token, 'another-token');
});
});
}