25
1
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:
Evgeniy Khramtsov 2017-05-11 16:15:18 +03:00
parent cdb191bb48
commit 81d9770d4f
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)