aboutsummaryrefslogtreecommitdiff
path: root/test/web/oauth/oauth_controller_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-03-25 09:05:17 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-03-25 09:05:17 +0300
commit012d428e1ffdd83888f339e4dbaec344202eebe1 (patch)
tree41483fdfb5c75e6d338ad48b83f7d4e621365694 /test/web/oauth/oauth_controller_test.exs
parente743c2232970e321c833604b232520587ad8e402 (diff)
parent8eebc75c152ee339bac347350266e3bc6536016b (diff)
downloadpleroma-012d428e1ffdd83888f339e4dbaec344202eebe1.tar.gz
Merge remote-tracking branch 'remotes/origin/develop' into 1364-notifications-sending-control
Diffstat (limited to 'test/web/oauth/oauth_controller_test.exs')
-rw-r--r--test/web/oauth/oauth_controller_test.exs12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/web/oauth/oauth_controller_test.exs b/test/web/oauth/oauth_controller_test.exs
index cff469c28..0b0972b17 100644
--- a/test/web/oauth/oauth_controller_test.exs
+++ b/test/web/oauth/oauth_controller_test.exs
@@ -17,8 +17,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
key: "_test",
signing_salt: "cooldude"
]
-
- clear_config([:instance, :account_activation_required])
+ setup do: clear_config([:instance, :account_activation_required])
describe "in OAuth consumer mode, " do
setup do
@@ -31,12 +30,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
]
end
- clear_config([:auth, :oauth_consumer_strategies]) do
- Pleroma.Config.put(
- [:auth, :oauth_consumer_strategies],
- ~w(twitter facebook)
- )
- end
+ setup do: clear_config([:auth, :oauth_consumer_strategies], ~w(twitter facebook))
test "GET /oauth/authorize renders auth forms, including OAuth consumer form", %{
app: app,
@@ -944,7 +938,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
end
describe "POST /oauth/token - refresh token" do
- clear_config([:oauth2, :issue_new_refresh_token])
+ setup do: clear_config([:oauth2, :issue_new_refresh_token])
test "issues a new access token with keep fresh token" do
Pleroma.Config.put([:oauth2, :issue_new_refresh_token], true)