summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2021-06-07 16:06:53 -0500
committerMark Felder <feld@feld.me>2021-06-07 16:06:53 -0500
commitf5ef7fe43bb42d5cd641666194f1d780499e1e09 (patch)
treeedcc7c4b5f06ce42772d75e104f73468a179573a
parentb553bfd745e76117efafd81c8306abd29e28e4a0 (diff)
Fix test warnings
-rw-r--r--test/pleroma/web/admin_api/controllers/config_controller_test.exs43
1 files changed, 20 insertions, 23 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