X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Ftwitter_api%2Futil_controller_test.exs;fp=test%2Fpleroma%2Fweb%2Ftwitter_api%2Futil_controller_test.exs;h=3f839568d24c9e2a8d5edcacbb56d45672d92d56;hb=07a48b9293e4046c50b5d424d60a1bf16c7cc198;hp=d669cd0fe9663c82269e6b418c51ee3f553c7d04;hpb=7f4d218cffaafd97d9a5fe636a1acef7ca1053d8;p=akkoma diff --git a/test/pleroma/web/twitter_api/util_controller_test.exs b/test/pleroma/web/twitter_api/util_controller_test.exs index d669cd0fe..3f839568d 100644 --- a/test/pleroma/web/twitter_api/util_controller_test.exs +++ b/test/pleroma/web/twitter_api/util_controller_test.exs @@ -77,11 +77,11 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do end end - describe "/api/pleroma/emoji" do + describe "/api/v1/pleroma/emoji" do test "returns json with custom emoji with tags", %{conn: conn} do emoji = conn - |> get("/api/pleroma/emoji") + |> get("/api/v1/pleroma/emoji") |> json_response_and_validate_schema(200) assert Enum.all?(emoji, fn @@ -95,7 +95,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do end end - describe "GET /api/pleroma/healthcheck" do + describe "GET /api/v1/pleroma/healthcheck" do setup do: clear_config([:instance, :healthcheck]) test "returns 503 when healthcheck disabled", %{conn: conn} do @@ -103,7 +103,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do response = conn - |> get("/api/pleroma/healthcheck") + |> get("/api/v1/pleroma/healthcheck") |> json_response_and_validate_schema(503) assert response == %{} @@ -116,7 +116,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do system_info: fn -> %Pleroma.Healthcheck{healthy: true} end do response = conn - |> get("/api/pleroma/healthcheck") + |> get("/api/v1/pleroma/healthcheck") |> json_response_and_validate_schema(200) assert %{ @@ -136,7 +136,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do system_info: fn -> %Pleroma.Healthcheck{healthy: false} end do response = conn - |> get("/api/pleroma/healthcheck") + |> get("/api/v1/pleroma/healthcheck") |> json_response_and_validate_schema(503) assert %{ @@ -334,7 +334,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do new: fn -> "test_captcha" end do resp = conn - |> get("/api/pleroma/captcha") + |> get("/api/v1/pleroma/captcha") |> response(200) assert resp == "\"test_captcha\"" @@ -459,7 +459,10 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do conn = conn |> put_req_header("content-type", "multipart/form-data") - |> post("/api/pleroma/change_email", %{password: "test", email: "cofe@foobar.com"}) + |> post("/api/pleroma/change_email", %{ + password: "test", + email: "cofe@foobar.com" + }) assert json_response_and_validate_schema(conn, 200) == %{"status" => "success"} end @@ -961,7 +964,9 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do conn = conn |> put_req_header("content-type", "application/json") - |> delete("/api/pleroma/aliases", %{alias: non_alias_user |> User.full_nickname()}) + |> delete("/api/pleroma/aliases", %{ + alias: non_alias_user |> User.full_nickname() + }) assert %{"error" => "Account has no such alias."} = json_response_and_validate_schema(conn, 404)