summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/mastodon_api_controller_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-06-11 11:32:01 +0000
committerlain <lain@soykaf.club>2019-06-11 11:32:01 +0000
commit63ab3c30ebb33241074cb252c449cd7879b77870 (patch)
tree31221764c19bfc33cf74639898a9148ae8fe06cd /test/web/mastodon_api/mastodon_api_controller_test.exs
parent3e3dcd223d9525fe63c84d0dc62a793c6661bbbe (diff)
parent7c063a898d60cadd324087999226314586b72bd3 (diff)
downloadpleroma-63ab3c30ebb33241074cb252c449cd7879b77870.tar.gz
pleroma-63ab3c30ebb33241074cb252c449cd7879b77870.zip
Merge branch 'feature/rate-limiter' into 'develop'
Feature/Rate Limiter Closes #943 See merge request pleroma/pleroma!1266
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs20
1 files changed, 1 insertions, 19 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index de32084bd..15d3fdb65 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -3551,24 +3551,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
end
describe "create account by app" do
- setup do
- enabled = Pleroma.Config.get([:app_account_creation, :enabled])
- max_requests = Pleroma.Config.get([:app_account_creation, :max_requests])
- interval = Pleroma.Config.get([:app_account_creation, :interval])
-
- Pleroma.Config.put([:app_account_creation, :enabled], true)
- Pleroma.Config.put([:app_account_creation, :max_requests], 5)
- Pleroma.Config.put([:app_account_creation, :interval], 1)
-
- on_exit(fn ->
- Pleroma.Config.put([:app_account_creation, :enabled], enabled)
- Pleroma.Config.put([:app_account_creation, :max_requests], max_requests)
- Pleroma.Config.put([:app_account_creation, :interval], interval)
- end)
-
- :ok
- end
-
test "Account registration via Application", %{conn: conn} do
conn =
conn
@@ -3671,7 +3653,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
agreement: true
})
- assert json_response(conn, 403) == %{"error" => "Rate limit exceeded."}
+ assert json_response(conn, :too_many_requests) == %{"error" => "Throttled"}
end
end