mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
Update Elixir tests for using new auth API
This commit is contained in:
parent
cdb191bb48
commit
81d9770d4f
@ -32,7 +32,7 @@ defmodule EjabberdAuthMock do
|
|||||||
|
|
||||||
{:ok, _pid} = Agent.start_link(fn -> %{} end, name: @agent)
|
{:ok, _pid} = Agent.start_link(fn -> %{} end, name: @agent)
|
||||||
|
|
||||||
mock(:ejabberd_auth, :is_user_exists,
|
mock(:ejabberd_auth, :user_exists,
|
||||||
fn (user, domain) ->
|
fn (user, domain) ->
|
||||||
Agent.get(@agent, fn users -> Map.get(users, {user, domain}) end) != nil
|
Agent.get(@agent, fn users -> Map.get(users, {user, domain}) end) != nil
|
||||||
end)
|
end)
|
||||||
|
@ -114,7 +114,7 @@ defmodule EjabberdCyrsaslTest do
|
|||||||
fn (_host) ->
|
fn (_host) ->
|
||||||
true
|
true
|
||||||
end)
|
end)
|
||||||
mock(:ejabberd_auth, :is_user_exists,
|
mock(:ejabberd_auth, :user_exists,
|
||||||
fn (user, domain) ->
|
fn (user, domain) ->
|
||||||
domain == "domain1" and get_password(user) != {:false, :internal}
|
domain == "domain1" and get_password(user) != {:false, :internal}
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user