forked from eatvio/eatvio_app
feat(tests): updated tests coverage to 66.5%
This commit is contained in:
@@ -52,6 +52,25 @@ void main() {
|
||||
expect(state.planModel, plan);
|
||||
expect(state.chosenOptionIndex, 1);
|
||||
});
|
||||
|
||||
test('copyWith creates new instance with updated values', () {
|
||||
const original = AboutPlanState(
|
||||
isLoading: false,
|
||||
error: null,
|
||||
planModel: null,
|
||||
chosenOptionIndex: 0,
|
||||
);
|
||||
|
||||
final updated = original.copyWith(
|
||||
isLoading: true,
|
||||
chosenOptionIndex: 2,
|
||||
);
|
||||
|
||||
expect(updated.isLoading, isTrue);
|
||||
expect(updated.chosenOptionIndex, 2);
|
||||
expect(updated.error, original.error);
|
||||
expect(updated.planModel, original.planModel);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user