forked from eatvio/eatvio_app
29 lines
867 B
Dart
29 lines
867 B
Dart
import 'package:eatvio_app/features/chat/models/plan_complain_model.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
void main() {
|
|
group('PlanComplainModel', () {
|
|
test('fromJson parses description correctly', () {
|
|
final json = {'description': 'Test complaint description'};
|
|
|
|
final model = PlanComplainModel.fromJson(json);
|
|
|
|
expect(model.description, 'Test complaint description');
|
|
});
|
|
|
|
test('toJson serializes description correctly', () {
|
|
final model = PlanComplainModel(description: 'Test complaint description');
|
|
|
|
final json = model.toJson();
|
|
|
|
expect(json['description'], 'Test complaint description');
|
|
});
|
|
|
|
test('creates instance with description', () {
|
|
final model = PlanComplainModel(description: 'Another complaint');
|
|
|
|
expect(model.description, 'Another complaint');
|
|
});
|
|
});
|
|
}
|