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

@@ -30,6 +30,22 @@ void main() {
expect(ingredient.name, 'Apple');
expect(ingredient.productId, 1);
});
test('toJson serializes Ingredient correctly', () {
const ingredient = Ingredient(
name: 'Apple',
unit: 'gr',
portion: '100',
productId: 1,
);
final json = ingredient.toJson();
expect(json['name'], 'Apple');
expect(json['unit'], 'gr');
expect(json['portion'], '100');
expect(json['product_nutritional_id'], 1);
});
});
}