chore: update test cases

pull/301/head
Allison Ryan 3 years ago
parent 95f1682365
commit 04a836ee72

@ -36,7 +36,8 @@ void main() {
);
blocTest<ChromeDinoCubit, ChromeDinoState>(
'onChomp emits ChromeDinoStatus.chomping and chomped ball',
'onChomp emits ChromeDinoStatus.chomping and chomped ball '
'when the ball is not in the mouth',
build: ChromeDinoCubit.new,
act: (bloc) => bloc.onChomp(ball),
expect: () => [
@ -54,6 +55,14 @@ void main() {
],
);
blocTest<ChromeDinoCubit, ChromeDinoState>(
'onChomp emits nothing when the ball is already in the mouth',
build: ChromeDinoCubit.new,
seed: () => const ChromeDinoState.inital().copyWith(ball: ball),
act: (bloc) => bloc.onChomp(ball),
expect: () => <ChromeDinoState>[],
);
blocTest<ChromeDinoCubit, ChromeDinoState>(
'onSpit emits ChromeDinoStatus.idle and removes ball',
build: ChromeDinoCubit.new,

Loading…
Cancel
Save