test(tests): add comprehensive unit tests for various models and repositories, enhancing test coverage and ensuring correct functionality

This commit is contained in:
mso7nueh
2025-12-09 16:19:48 +03:00
parent edd064d20d
commit 70e4a42e98
25 changed files with 2565 additions and 58 deletions

View File

@@ -46,6 +46,20 @@ void main() {
expect(state.blogPostModel, blogPost);
expect(state.isLoading, isFalse);
});
test('fromJson создает BlogPostState из JSON', () {
final json = {
'blogPostModel': null,
'isLoading': false,
'error': null,
};
final state = BlogPostState.fromJson(json);
expect(state.blogPostModel, isNull);
expect(state.isLoading, isFalse);
expect(state.error, isNull);
});
});
}