diff options
author | lain <lain@soykaf.club> | 2020-03-20 16:54:55 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-03-20 16:54:55 +0000 |
commit | d23e81903dfe5032bb20b92bcc7dfb47434ba669 (patch) | |
tree | db7724289ac074e0b70b7405d9080e50b8a8175d /test/web/oauth/oauth_controller_test.exs | |
parent | 5efa5b0c4a08c2bf73d6926ee7c418e31a04195c (diff) | |
parent | 1c05f539aaea32fe993e5299e656aa44c322e8de (diff) | |
download | pleroma-d23e81903dfe5032bb20b92bcc7dfb47434ba669.tar.gz pleroma-d23e81903dfe5032bb20b92bcc7dfb47434ba669.zip |
Merge branch 'clear-config-test-improvements' into 'develop'
Improved in-test config management
See merge request pleroma/pleroma!2312
Diffstat (limited to 'test/web/oauth/oauth_controller_test.exs')
-rw-r--r-- | test/web/oauth/oauth_controller_test.exs | 12 |
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) |