chore(version): update app version to 1.3.5+85 and improve test coverage reporting in CI

This commit is contained in:
mso7nueh
2025-12-08 11:19:08 +03:00
parent abe4985f0e
commit c2a506cdbf
148 changed files with 12395 additions and 1889 deletions

View File

@@ -3,34 +3,54 @@ import 'package:flutter_test/flutter_test.dart';
void main() {
group('CommentUpdateModel', () {
test('создание модели через конструктор', () {
final model = CommentUpdateModel(body: 'Обновлённый текст комментария');
test('creates model with body', () {
final model = CommentUpdateModel(
body: 'Test comment body',
);
expect(model.body, 'Обновлённый текст комментария');
expect(model.body, 'Test comment body');
});
test('создание модели из JSON', () {
final json = {'body': 'Текст комментария'};
final model = CommentUpdateModel.fromJson(json);
test('creates model with empty body', () {
final model = CommentUpdateModel(
body: '',
);
expect(model.body, 'Текст комментария');
expect(model.body, '');
});
test('преобразование модели в JSON', () {
final model = CommentUpdateModel(body: 'Текст комментария');
final json = model.toJson();
test('creates model with long body', () {
final longBody = 'A' * 1000;
final model = CommentUpdateModel(
body: longBody,
);
expect(json['body'], 'Текст комментария');
expect(model.body, longBody);
expect(model.body.length, 1000);
});
test('равенство моделей', () {
final model1 = CommentUpdateModel(body: 'Текст комментария');
final model2 = CommentUpdateModel(body: 'Текст комментария');
final model3 = CommentUpdateModel(body: 'Другой текст');
test('can be compared', () {
final model1 = CommentUpdateModel(
body: 'Test',
);
expect(model1, equals(model2));
expect(model1, isNot(equals(model3)));
final model2 = CommentUpdateModel(
body: 'Test',
);
expect(model1 == model2, true);
});
test('different bodies are not equal', () {
final model1 = CommentUpdateModel(
body: 'Test 1',
);
final model2 = CommentUpdateModel(
body: 'Test 2',
);
expect(model1 == model2, false);
});
});
}