summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2023-03-26 11:11:26 -0400
committertusooa <tusooa@kazv.moe>2023-03-26 11:19:44 -0400
commit67d1897c6e9516ea76dff1456f15c9427813bda4 (patch)
tree676d510dfcf000834dfc13986b310db24705adc7
parent10930f7507412fb1bea760723ee466774f95c6f3 (diff)
downloadpleroma-67d1897c6e9516ea76dff1456f15c9427813bda4.tar.gz
pleroma-67d1897c6e9516ea76dff1456f15c9427813bda4.zip
Fix existing tests
-rw-r--r--test/pleroma/web/mastodon_api/controllers/status_controller_test.exs7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
index 61d87ffbe..1e8979127 100644
--- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
@@ -626,7 +626,10 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest 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)
@@ -642,7 +645,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest 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
}
})