diff options
author | Maxim Filippov <colixer@gmail.com> | 2019-07-24 02:42:28 +0300 |
---|---|---|
committer | Maxim Filippov <colixer@gmail.com> | 2019-07-24 02:42:28 +0300 |
commit | f46805bb40bf29cd67acb33b6b65ed1e4e28d3e1 (patch) | |
tree | 7542dbbe178183e4dd3c3451aa7744f18117fa37 /test/web/admin_api/admin_api_controller_test.exs | |
parent | 03471151d6089e318abaf5265d42ffedf7a5b902 (diff) | |
parent | 1a751529fb2cd3929e3373a908bec5db5cc32f1b (diff) | |
download | pleroma-f46805bb40bf29cd67acb33b6b65ed1e4e28d3e1.tar.gz |
Merge branch 'develop' into feature/admin-api-user-statuses
Diffstat (limited to 'test/web/admin_api/admin_api_controller_test.exs')
-rw-r--r-- | test/web/admin_api/admin_api_controller_test.exs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs index 20d5268a2..6dda4ae51 100644 --- a/test/web/admin_api/admin_api_controller_test.exs +++ b/test/web/admin_api/admin_api_controller_test.exs @@ -1010,6 +1010,17 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do "uses" => 0 } end + + test "with invalid token" do + admin = insert(:user, info: %{is_admin: true}) + + conn = + build_conn() + |> assign(:user, admin) + |> post("/api/pleroma/admin/users/revoke_invite", %{"token" => "foo"}) + + assert json_response(conn, :not_found) == "Not found" + end end describe "GET /api/pleroma/admin/reports/:id" do @@ -1560,7 +1571,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do %{"tuple" => [":method", "Pleroma.Captcha.Kocaptcha"]}, %{"tuple" => [":seconds_valid", 60]}, %{"tuple" => [":path", ""]}, - %{"tuple" => [":key1", nil]} + %{"tuple" => [":key1", nil]}, + %{"tuple" => [":partial_chain", "&:hackney_connect.partial_chain/1"]} ] } ] @@ -1576,7 +1588,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do %{"tuple" => [":method", "Pleroma.Captcha.Kocaptcha"]}, %{"tuple" => [":seconds_valid", 60]}, %{"tuple" => [":path", ""]}, - %{"tuple" => [":key1", nil]} + %{"tuple" => [":key1", nil]}, + %{"tuple" => [":partial_chain", "&:hackney_connect.partial_chain/1"]} ] } ] |