The API was recently changed to be more generic. We track that here by
looking for a .move property in the body object, instead of .square.
And we conform to that by sending events with data named "move" nota
"square" in the corresponding test cases.
tictactoe_move()
{
- curl_post $tictactoe_game_path/move "{\"square\": $1}"
+ curl_post $tictactoe_game_path/move "{ \"move\": $1 }"
}
TEST_SUBSECTION "Tic Tac Toe /move"
TEST_END
TEST_REPORT
-
router.post('/move', (request, response) => {
const game = request.game;
- const square = request.body.square;
+ const square = request.body.move;
const legal = game.add_move(square);