forked from eatvio/eatvio_app
test(tests): add comprehensive unit tests for various models and repositories, enhancing test coverage and ensuring correct functionality
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user