Merge branch 'fix/spaceship-ramp-logic' of github.com:VGVentures/pinball into fix/spaceship-ramp-logic

pull/416/head
RuiAlonso 3 years ago
commit 10128ee4cc

@ -70,21 +70,14 @@ void main() {
group('onReset', () { group('onReset', () {
blocTest<SpaceshipRampCubit, SpaceshipRampState>( blocTest<SpaceshipRampCubit, SpaceshipRampState>(
'emits state reset to initial values', 'emits initial state',
build: SpaceshipRampCubit.new, build: SpaceshipRampCubit.new,
seed: () => SpaceshipRampState( seed: () => SpaceshipRampState(
hits: 100, hits: 100,
lightState: ArrowLightState.active3, lightState: ArrowLightState.active3,
), ),
act: (bloc) => bloc.onReset(), act: (bloc) => bloc.onReset(),
expect: () => [ expect: () => [SpaceshipRampState.initial(),
isA<SpaceshipRampState>()
..having((state) => state.hits, 'hits', 0)
..having(
(state) => state.lightState,
'lightState',
ArrowLightState.inactive,
),
], ],
); );
}); });

@ -62,8 +62,8 @@ void main() {
}, },
); );
group('loads', () { group('adds', () {
flameTester.test('adds a FlameBlocProvider', (game) async { flameTester.test('a FlameBlocProvider', (game) async {
final ramp = SpaceshipRamp(); final ramp = SpaceshipRamp();
await game.ensureAdd(ramp); await game.ensureAdd(ramp);
expect( expect(

Loading…
Cancel
Save