1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-26 01:25:24 +01:00

test: fix defective ldap setup/teardown

This commit is contained in:
William Pitcock 2019-03-16 04:05:19 +00:00
parent 532e8b0a43
commit 40134598a8

View File

@ -11,15 +11,17 @@ defmodule Pleroma.Web.OAuth.LDAPAuthorizationTest do
import Mock
setup_all do
ldap_authenticator = Pleroma.Config.get([Pleroma.Web.Auth.Authenticator])
ldap_authenticator =
Pleroma.Config.get(Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator)
ldap_enabled = Pleroma.Config.get([:ldap, :enabled])
on_exit(fn ->
Pleroma.Config.put([Pleroma.Web.Auth.Authenticator], ldap_authenticator)
Pleroma.Config.put(Pleroma.Web.Auth.Authenticator, ldap_authenticator)
Pleroma.Config.put([:ldap, :enabled], ldap_enabled)
end)
Pleroma.Config.put([Pleroma.Web.Auth.Authenticator], Pleroma.Web.Auth.LDAPAuthenticator)
Pleroma.Config.put(Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.LDAPAuthenticator)
Pleroma.Config.put([:ldap, :enabled], true)
:ok