X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=test;h=8d01515418720f7d185854fa25cbc67a5c761179;hb=091f697a575e87baba119573f9c75348f993c18d;hp=d8a46ec970edf2bc40e4b382c48e1979a5ea1501;hpb=2690233f317b87e7336b0404ae711837e726d5cf;p=empires-server diff --git a/test b/test index d8a46ec..8d01515 100755 --- a/test +++ b/test @@ -300,37 +300,37 @@ TEST_SECTION "Tic Tac Toe game" tictactoe_game_path=tictactoe/$tictactoe_game_id -tictactoe_move() +tictactoe_profile() { - curl_post $tictactoe_game_path/move "{ \"move\": $1 }" "-b .test-cookie" + curl_put /profile "{ \"nickname\": \"$1\" }" "-c .cookie-tictactoe" } -lmno_profile() +tictactoe_move() { - curl_put /profile "{ \"nickname\": \"$1\" }" "-c .test-cookie" + curl_post $tictactoe_game_path/move "{ \"move\": $1 }" "-b .cookie-tictactoe" } tictactoe_player_info() { - curl_get $tictactoe_game_path/events "-m 0.1 -b .test-cookie" 2>&1 \ + curl_get $tictactoe_game_path/events "-m 0.1 -b .cookie-tictactoe" 2>&1 \ | grep player-info -A 1 \ | grep ^data } tictactoe_player_name() { - curl_put $tictactoe_game_path/player "{ \"name\": \"$1\" }" "-b .test-cookie" + curl_put $tictactoe_game_path/player "{ \"name\": \"$1\" }" "-b .cookie-tictactoe" } tictactoe_player_team() { - curl_put $tictactoe_game_path/player "{ \"team\": \"$1\" }" "-b .test-cookie" + curl_put $tictactoe_game_path/player "{ \"team\": \"$1\" }" "-b .cookie-tictactoe" } TEST_SUBSECTION "Tic Tac Toe player-info" TEST "Hit LMNO /profile to set name to 'curl'" -lmno_profile curl +tictactoe_profile curl TEST_END TEST "Verify player-info event reports 'curl' name"