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

@@ -0,0 +1,34 @@
import 'package:eatvio_app/features/order_info/cubit/order_info_state.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('OrderInfoState', () {
test('creates instance with default values', () {
final state = OrderInfoState();
expect(state.isLoading, isTrue);
expect(state.chosenPlan, isNull);
expect(state.customerProfile, isNull);
});
test('creates instance with custom values', () {
final state = OrderInfoState(
isLoading: false,
);
expect(state.isLoading, isFalse);
expect(state.chosenPlan, isNull);
expect(state.customerProfile, isNull);
});
test('copyWith creates new instance with updated values', () {
final original = OrderInfoState();
final updated = original.copyWith(isLoading: false);
expect(updated.isLoading, isFalse);
expect(updated.chosenPlan, original.chosenPlan);
expect(updated.customerProfile, original.customerProfile);
});
});
}