refactor(tests): update the controller test description
This commit is contained in:
parent
9288df4d65
commit
23c5e9f0d3
|
|
@ -4,31 +4,31 @@ import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('CardSwiperController', () {
|
group('CardSwiperController', () {
|
||||||
test('swipe() changes state to swipe', () {
|
test('swipe() should change the state to swipe', () {
|
||||||
final controller = CardSwiperController();
|
final controller = CardSwiperController();
|
||||||
controller.swipe();
|
controller.swipe();
|
||||||
expect(controller.state, CardSwiperState.swipe);
|
expect(controller.state, CardSwiperState.swipe);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('swipeLeft() changes state to swipeLeft', () {
|
test('swipeLeft() should change the state to swipeLeft', () {
|
||||||
final controller = CardSwiperController();
|
final controller = CardSwiperController();
|
||||||
controller.swipeLeft();
|
controller.swipeLeft();
|
||||||
expect(controller.state, CardSwiperState.swipeLeft);
|
expect(controller.state, CardSwiperState.swipeLeft);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('swipeRight() changes state to swipeRight', () {
|
test('swipeRight() should change the state to swipeRight', () {
|
||||||
final controller = CardSwiperController();
|
final controller = CardSwiperController();
|
||||||
controller.swipeRight();
|
controller.swipeRight();
|
||||||
expect(controller.state, CardSwiperState.swipeRight);
|
expect(controller.state, CardSwiperState.swipeRight);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('swipeTop() changes state to swipeTop', () {
|
test('swipeTop() should change the state to swipeTop', () {
|
||||||
final controller = CardSwiperController();
|
final controller = CardSwiperController();
|
||||||
controller.swipeTop();
|
controller.swipeTop();
|
||||||
expect(controller.state, CardSwiperState.swipeTop);
|
expect(controller.state, CardSwiperState.swipeTop);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('swipeBottom() changes state to swipeBottom', () {
|
test('swipeBottom() should change the state to swipeBottom', () {
|
||||||
final controller = CardSwiperController();
|
final controller = CardSwiperController();
|
||||||
controller.swipeBottom();
|
controller.swipeBottom();
|
||||||
expect(controller.state, CardSwiperState.swipeBottom);
|
expect(controller.state, CardSwiperState.swipeBottom);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue