summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/subscription_controller_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-04-21 08:20:50 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-04-21 08:20:50 +0300
commitbb5d0eafa437c9d32cdd8ccdb92b2eabb8ccccf1 (patch)
tree307120b8958a5be8dad4a16e6e2ff779336a30e3 /test/web/mastodon_api/controllers/subscription_controller_test.exs
parentf7e623c11c4b6f4f323a4317e9489092be73f9cd (diff)
parente57c1b60e4a0f882d5217bf1be8b1a7240aa322d (diff)
downloadpleroma-bb5d0eafa437c9d32cdd8ccdb92b2eabb8ccccf1.tar.gz
pleroma-bb5d0eafa437c9d32cdd8ccdb92b2eabb8ccccf1.zip
Merge remote-tracking branch 'remotes/origin/develop' into 1364-no-pushes-from-blocked-domains-users
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'test/web/mastodon_api/controllers/subscription_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/subscription_controller_test.exs13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/web/mastodon_api/controllers/subscription_controller_test.exs b/test/web/mastodon_api/controllers/subscription_controller_test.exs
index 987158a74..5682498c0 100644
--- a/test/web/mastodon_api/controllers/subscription_controller_test.exs
+++ b/test/web/mastodon_api/controllers/subscription_controller_test.exs
@@ -35,7 +35,10 @@ defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
quote do
vapid_details = Application.get_env(:web_push_encryption, :vapid_details, [])
Application.put_env(:web_push_encryption, :vapid_details, [])
- assert "Something went wrong" == unquote(yield)
+
+ assert %{"error" => "Web push subscription is disabled on this Pleroma instance"} ==
+ unquote(yield)
+
Application.put_env(:web_push_encryption, :vapid_details, vapid_details)
end
end
@@ -45,7 +48,7 @@ defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
assert_error_when_disable_push do
conn
|> post("/api/v1/push/subscription", %{})
- |> json_response(500)
+ |> json_response(403)
end
end
@@ -74,7 +77,7 @@ defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
assert_error_when_disable_push do
conn
|> get("/api/v1/push/subscription", %{})
- |> json_response(500)
+ |> json_response(403)
end
end
@@ -127,7 +130,7 @@ defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
assert_error_when_disable_push do
conn
|> put("/api/v1/push/subscription", %{data: %{"alerts" => %{"mention" => false}}})
- |> json_response(500)
+ |> json_response(403)
end
end
@@ -155,7 +158,7 @@ defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
assert_error_when_disable_push do
conn
|> delete("/api/v1/push/subscription", %{})
- |> json_response(500)
+ |> json_response(403)
end
end