summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2021-06-07 21:22:23 +0000
committerfeld <feld@feld.me>2021-06-07 21:22:23 +0000
commit4a6b49d0b4529936b06a3f1668d937220fb2173b (patch)
tree65fa5b248106b1ef84b3bd9c26e023dcec8043bc
parent30943b739d8d7eefed94f13bc442d1fc348e2737 (diff)
parent017f947fc111eb98c964cd984fdb073623407b0e (diff)
Merge branch 'fix/config-test-warning' into 'develop'
Fix test warnings See merge request pleroma/pleroma!3452
-rw-r--r--test/pleroma/web/admin_api/controllers/config_controller_test.exs43
-rw-r--r--test/pleroma/web/shout_channel_test.exs (renamed from test/pleroma/web/shout_channel_test.ex)2
2 files changed, 21 insertions, 24 deletions
diff --git a/test/pleroma/web/admin_api/controllers/config_controller_test.exs b/test/pleroma/web/admin_api/controllers/config_controller_test.exs
index d8ca07cd3..7c786c389 100644
--- a/test/pleroma/web/admin_api/controllers/config_controller_test.exs
+++ b/test/pleroma/web/admin_api/controllers/config_controller_test.exs
@@ -1427,30 +1427,27 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
]
}
- res =
- assert conn
- |> put_req_header("content-type", "application/json")
- |> post("/api/pleroma/admin/config", %{"configs" => [params]})
- |> json_response_and_validate_schema(200)
-
- assert res == %{
- "configs" => [
- %{
- "db" => [":instance_thumbnail"],
- "group" => ":pleroma",
- "key" => ":instance",
- "value" => params["value"]
- }
- ],
- "need_reboot" => false
- }
-
- _res =
- assert conn
- |> get("/api/v1/instance")
- |> json_response_and_validate_schema(200)
+ assert conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/pleroma/admin/config", %{"configs" => [params]})
+ |> json_response_and_validate_schema(200) ==
+ %{
+ "configs" => [
+ %{
+ "db" => [":instance_thumbnail"],
+ "group" => ":pleroma",
+ "key" => ":instance",
+ "value" => params["value"]
+ }
+ ],
+ "need_reboot" => false
+ }
- assert res = %{"thumbnail" => "https://example.com/media/new_thumbnail.jpg"}
+ assert conn
+ |> get("/api/v1/instance")
+ |> json_response_and_validate_schema(200)
+ |> Map.take(["thumbnail"]) ==
+ %{"thumbnail" => "https://example.com/media/new_thumbnail.jpg"}
end
test "Concurrent Limiter", %{conn: conn} do
diff --git a/test/pleroma/web/shout_channel_test.ex b/test/pleroma/web/shout_channel_test.exs
index a266543d2..5c86efe9f 100644
--- a/test/pleroma/web/shout_channel_test.ex
+++ b/test/pleroma/web/shout_channel_test.exs
@@ -14,7 +14,7 @@ defmodule Pleroma.Web.ShoutChannelTest do
{:ok, _, socket} =
socket(UserSocket, "", %{user_name: user.nickname})
- |> subscribe_and_join(ShoutChannel, "shout:public")
+ |> subscribe_and_join(ShoutChannel, "chat:public")
{:ok, socket: socket}
end