This just verifies we can move to a square, (and can't then move to
the same square again).
To do something more interesting here, I'll have to think about how to
test with multiple clients connecting to the same game and how to
verify the results of the streaming from the /events API.
test "$players" = ""
TEST_END
+TEST_SECTION "Tic Tac Toe game"
+
+tictactoe_game_path=tictactoe/$tictactoe_game_id
+
+tictactoe_move()
+{
+ curl_post $tictactoe_game_path/move "{\"square\": $1}"
+}
+
+TEST_SUBSECTION "Tic Tac Toe /move"
+
+TEST "Move to the center square"
+result=$(tictactoe_move 4)
+test "$result" = "true"
+TEST_END
+
+TEST "Move to center square again is now illegal"
+result=$(tictactoe_move 4)
+test "$result" = "false"
+TEST_END
+
TEST_REPORT