| grep ^data
}
+tictactoe_player()
+{
+ curl_put $tictactoe_game_path/player "{ \"name\": \"$1\" }" "-b .test-cookie"
+}
+
TEST_SUBSECTION "Tic Tac Toe player-info"
TEST "Hit LMNO /profile to set name to 'curl'"
test "$result" = 'data: {"id":1,"name":"curl"}'
TEST_END
+TEST_SUBSECTION "Tic Tac Toe /player"
+
+TEST "Change name to 'newname'"
+tictactoe_player newname
+TEST_END
+
+TEST "Verify player-info event reports 'newname'"
+result=$(tictactoe_player_info)
+test "$result" = 'data: {"id":1,"name":"newname"}'
+TEST_END
+
TEST_SUBSECTION "Tic Tac Toe /move"
TEST "Move to the center square"