"poll" => %{"options" => Enum.map(0..limit, fn _ -> "desu" end), "expires_in" => 1}
})
- %{"error" => error} = json_response(conn, 401)
+ %{"error" => error} = json_response(conn, 422)
assert error == "Poll can't contain more than #{limit} options"
end
}
})
- %{"error" => error} = json_response(conn, 401)
+ %{"error" => error} = json_response(conn, 422)
assert error == "Poll options cannot be longer than #{limit} characters each"
end
}
})
- %{"error" => error} = json_response(conn, 401)
+ %{"error" => error} = json_response(conn, 422)
assert error == "Expiration date is too soon"
end
}
})
- %{"error" => error} = json_response(conn, 401)
+ %{"error" => error} = json_response(conn, 422)
assert error == "Expiration date is too far in the future"
end
end