From 04571a4755197a473cb5eb68db7725c64e7ac4bb Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 11 Jun 2020 17:07:20 -0700 Subject: [PATCH] test: Add test case for rejection of category that is far too large As implemented in the previous commit. --- test | 5 +++++ 1 file changed, 5 insertions(+) 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" -- 2.43.0