From: Carl Worth Date: Fri, 12 Jun 2020 00:07:20 +0000 (-0700) Subject: test: Add test case for rejection of category that is far too large X-Git-Url: https://git.cworth.org/git?p=lmno-server;a=commitdiff_plain;h=04571a4755197a473cb5eb68db7725c64e7ac4bb test: Add test case for rejection of category that is far too large As implemented in the previous commit. --- diff --git a/test b/test index 667d6ac..d419fc1 100755 --- a/test +++ b/test @@ -460,6 +460,11 @@ empathy_submit_prompt() curl_post $empathy_game_path/prompts "{ \"items\": $2, \"prompt\": \"$3\"}" "-b $1" } +TEST "Huge numbers are rejected" +result=$(empathy_submit_prompt $alice 10000 "10,000 Maniacs") +test "$result" = '{"valid":false,"message":"Maximum number of items is 20"}' +TEST_END + TEST "Submit a category" prompt_id=$(empathy_submit_prompt $alice 4 "4 things on a beach" | jq .id) test "$prompt_id" = "1"