Fix existing tests
This commit is contained in:
parent
3095251e6c
commit
1def80c2e7
1 changed files with 5 additions and 2 deletions
|
@ -674,7 +674,10 @@ test "option limit is enforced", %{conn: conn} do
|
|||
|> put_req_header("content-type", "application/json")
|
||||
|> post("/api/v1/statuses", %{
|
||||
"status" => "desu~",
|
||||
"poll" => %{"options" => Enum.map(0..limit, fn _ -> "desu" end), "expires_in" => 1}
|
||||
"poll" => %{
|
||||
"options" => Enum.map(0..limit, fn num -> "desu #{num}" end),
|
||||
"expires_in" => 1
|
||||
}
|
||||
})
|
||||
|
||||
%{"error" => error} = json_response_and_validate_schema(conn, 422)
|
||||
|
@ -690,7 +693,7 @@ test "option character limit is enforced", %{conn: conn} do
|
|||
|> post("/api/v1/statuses", %{
|
||||
"status" => "...",
|
||||
"poll" => %{
|
||||
"options" => [Enum.reduce(0..limit, "", fn _, acc -> acc <> "." end)],
|
||||
"options" => [String.duplicate(".", limit + 1), "lol"],
|
||||
"expires_in" => 1
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue