forked from eatvio/eatvio_app
feat(tests): updated tests coverage to 66.5%
This commit is contained in:
@@ -40,5 +40,26 @@ void main() {
|
||||
expect(step.image, isNull);
|
||||
expect(step.description, isNull);
|
||||
});
|
||||
|
||||
test('toJson serializes Step correctly', () {
|
||||
const step = Step(
|
||||
image: 'https://example.com/image.jpg',
|
||||
description: 'Test step description',
|
||||
);
|
||||
|
||||
final json = step.toJson();
|
||||
|
||||
expect(json['image'], 'https://example.com/image.jpg');
|
||||
expect(json['description'], 'Test step description');
|
||||
});
|
||||
|
||||
test('toJson serializes Step with null values correctly', () {
|
||||
const step = Step();
|
||||
|
||||
final json = step.toJson();
|
||||
|
||||
expect(json['image'], isNull);
|
||||
expect(json['description'], isNull);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user