Improved in-test clear_config/n applicability (setup / setup_all / in-test usage).
This commit is contained in:
parent
0e27c274f4
commit
1c05f539aa
84 changed files with 196 additions and 298 deletions
|
|
@ -12,9 +12,9 @@ defmodule Pleroma.Web.OAuth.LDAPAuthorizationTest do
|
|||
|
||||
@skip if !Code.ensure_loaded?(:eldap), do: :skip
|
||||
|
||||
clear_config_all([:ldap, :enabled], true)
|
||||
setup_all do: clear_config([:ldap, :enabled], true)
|
||||
|
||||
clear_config_all(Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.LDAPAuthenticator)
|
||||
setup_all do: clear_config(Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.LDAPAuthenticator)
|
||||
|
||||
@tag @skip
|
||||
test "authorizes the existing user using LDAP credentials" do
|
||||
|
|
|
|||
|
|
@ -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,7 +30,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
|
|||
]
|
||||
end
|
||||
|
||||
clear_config([:auth, :oauth_consumer_strategies], ~w(twitter facebook))
|
||||
setup do: clear_config([:auth, :oauth_consumer_strategies], ~w(twitter facebook))
|
||||
|
||||
test "GET /oauth/authorize renders auth forms, including OAuth consumer form", %{
|
||||
app: app,
|
||||
|
|
@ -939,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue