Browse Source

test: fix defective ldap setup/teardown

tags/v1.1.4
William Pitcock 5 years ago
parent
commit
40134598a8
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      test/web/oauth/ldap_authorization_test.exs

+ 5
- 3
test/web/oauth/ldap_authorization_test.exs 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


Loading…
Cancel
Save