diff options
author | Mickael Remond <mremond@process-one.net> | 2016-03-31 22:01:57 +0200 |
---|---|---|
committer | Mickael Remond <mremond@process-one.net> | 2016-03-31 22:01:57 +0200 |
commit | 97d345d2877dcac10f81642d8ba09a39a4e787f8 (patch) | |
tree | 7f6ead7012edc436d46a86d9f4bb3b0e883b25c4 /test/ejabberd_auth_mock.exs | |
parent | Fix failing tests (diff) |
Port mod_admin_extra test to work with new API
Diffstat (limited to 'test/ejabberd_auth_mock.exs')
-rw-r--r-- | test/ejabberd_auth_mock.exs | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/test/ejabberd_auth_mock.exs b/test/ejabberd_auth_mock.exs index 495c527f..bbe90514 100644 --- a/test/ejabberd_auth_mock.exs +++ b/test/ejabberd_auth_mock.exs @@ -1,5 +1,22 @@ - # ejabberd_auth mock - ###################### +# ---------------------------------------------------------------------- +# +# ejabberd, Copyright (C) 2002-2016 ProcessOne +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# ---------------------------------------------------------------------- defmodule EjabberdAuthMock do @@ -24,7 +41,7 @@ defmodule EjabberdAuthMock do Agent.get(@agent, fn users -> Map.get(users, {user, domain}, "") end ) end) mock(:ejabberd_auth, :check_password, - fn (user, domain, password) -> + fn (user, authzid, domain, password) -> Agent.get(@agent, fn users -> Map.get(users, {user, domain}) end) == password end) |