25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Update check_password tests are the command now is fixed

This commit is contained in:
Badlop 2016-04-11 13:39:35 +02:00
parent bd3b7cd2df
commit 695592a38c

View File

@ -73,13 +73,13 @@ defmodule EjabberdModAdminExtraTest do
EjabberdAuthMock.create_user @user, @domain, @password EjabberdAuthMock.create_user @user, @domain, @password
assert :ejabberd_commands.execute_command(:check_password, assert :ejabberd_commands.execute_command(:check_password,
[@user, <<"">>, @domain, @password]) [@user, @domain, @password])
refute :ejabberd_commands.execute_command(:check_password, refute :ejabberd_commands.execute_command(:check_password,
[@user, <<"">>, @domain, "bad_password"]) [@user, @domain, "bad_password"])
refute :ejabberd_commands.execute_command(:check_password, refute :ejabberd_commands.execute_command(:check_password,
[@user, <<"">>, "bad_domain", @password]) [@user, "bad_domain", @password])
refute :ejabberd_commands.execute_command(:check_password, refute :ejabberd_commands.execute_command(:check_password,
["bad_user", <<"">>, @domain, @password]) ["bad_user", @domain, @password])
assert :meck.validate :ejabberd_auth assert :meck.validate :ejabberd_auth
@ -117,9 +117,9 @@ defmodule EjabberdModAdminExtraTest do
assert :ejabberd_commands.execute_command(:change_password, assert :ejabberd_commands.execute_command(:change_password,
[@user, @domain, "new_password"]) [@user, @domain, "new_password"])
refute :ejabberd_commands.execute_command(:check_password, refute :ejabberd_commands.execute_command(:check_password,
[@user, <<"">>, @domain, @password]) [@user, @domain, @password])
assert :ejabberd_commands.execute_command(:check_password, assert :ejabberd_commands.execute_command(:check_password,
[@user, <<"">>, @domain, "new_password"]) [@user, @domain, "new_password"])
assert {:not_found, 'unknown_user'} == assert {:not_found, 'unknown_user'} ==
catch_throw :ejabberd_commands.execute_command(:change_password, catch_throw :ejabberd_commands.execute_command(:change_password,
["bad_user", @domain, ["bad_user", @domain,