From 2d804866fb1367090e2f7767d42d2cd8762f5659 Mon Sep 17 00:00:00 2001 From: RuiAlonso Date: Thu, 24 Mar 2022 13:39:23 +0100 Subject: [PATCH] test: fixed priority test changes --- test/game/components/spaceship_test.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/game/components/spaceship_test.dart b/test/game/components/spaceship_test.dart index 92517e9f..43b9fa1f 100644 --- a/test/game/components/spaceship_test.dart +++ b/test/game/components/spaceship_test.dart @@ -36,25 +36,30 @@ void main() { group('SpaceshipEntranceBallContactCallback', () { test('changes the ball priority on contact', () { + when(() => ball.priority).thenReturn(1); + when(() => entrance.priority).thenReturn(2); + SpaceshipEntranceBallContactCallback().begin( entrance, ball, MockContact(), ); - verify(() => ball.elevation = Elevation.spaceship.order).called(1); + verify(() => ball.showInFrontOf(entrance)).called(1); }); }); group('SpaceshipHoleBallContactCallback', () { test('changes the ball priority on contact', () { + when(() => ball.priority).thenReturn(1); + SpaceshipHoleBallContactCallback().begin( hole, ball, MockContact(), ); - verify(() => ball.elevation = Elevation.board.order).called(1); + verify(() => ball.sendToBack()).called(1); }); }); });