summaryrefslogtreecommitdiff
path: root/server/test/command/corrosive_spew_command_test.dart
diff options
context:
space:
mode:
Diffstat (limited to 'server/test/command/corrosive_spew_command_test.dart')
-rw-r--r--server/test/command/corrosive_spew_command_test.dart31
1 files changed, 31 insertions, 0 deletions
diff --git a/server/test/command/corrosive_spew_command_test.dart b/server/test/command/corrosive_spew_command_test.dart
new file mode 100644
index 0000000..d47acf8
--- /dev/null
+++ b/server/test/command/corrosive_spew_command_test.dart
@@ -0,0 +1,31 @@
+import 'package:test/test.dart';
+import 'package:x_haven_server/core/commands/corrosive_spew_command.dart';
+import 'package:x_haven_server/core/state/game_state.dart';
+import 'package:x_haven_server/core/service_locator.dart';
+
+import 'test_helpers.dart';
+
+void main() {
+ setUpAll(() async {
+ await setUpGame();
+ });
+
+ group('CorrosiveSpewCommand', () {
+ test('should set corrosiveSpew to true on main modifier deck', () {
+ // CorrosiveSpew targets "Ruinmaw" which falls through to the main deck
+ expect(getIt<GameState>().modifierDeck.corrosiveSpew, isFalse);
+
+ CorrosiveSpewCommand(gameState: getIt<GameState>()).execute();
+
+ expect(getIt<GameState>().modifierDeck.corrosiveSpew, isTrue);
+ checkSaveState();
+ });
+
+ test('describe returns correct string', () {
+ expect(
+ CorrosiveSpewCommand(gameState: getIt<GameState>()).describe(),
+ 'Corrosive Spew',
+ );
+ });
+ });
+}