mirror of https://github.com/flutter/pinball.git
parent
ba12b9f890
commit
85aaf0f320
@ -0,0 +1,25 @@
|
||||
import 'package:bloc_test/bloc_test.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pinball_components/pinball_components.dart';
|
||||
|
||||
void main() {
|
||||
group('PlungerCubit', () {
|
||||
test('can be instantiated', () {
|
||||
expect(PlungerCubit(), isA<PlungerCubit>());
|
||||
});
|
||||
|
||||
blocTest<PlungerCubit, PlungerState>(
|
||||
'overrides previous pulling state',
|
||||
build: PlungerCubit.new,
|
||||
act: (cubit) => cubit
|
||||
..pulled()
|
||||
..autoPulled()
|
||||
..pulled(),
|
||||
expect: () => [
|
||||
PlungerState.pulling,
|
||||
PlungerState.autoPulling,
|
||||
PlungerState.pulling,
|
||||
],
|
||||
);
|
||||
});
|
||||
}
|
Loading…
Reference in new issue