mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Fix cyrsasl test after recent changes
This commit is contained in:
parent
5ef60bf594
commit
1bda40dac7
1 changed files with 5 additions and 5 deletions
|
@ -45,12 +45,12 @@ defmodule EjabberdCyrsaslTest do
|
||||||
|
|
||||||
test "Plain text (correct user wrong pass)", context do
|
test "Plain text (correct user wrong pass)", context do
|
||||||
step1 = :cyrsasl.server_start(context[:cyrstate], "PLAIN", <<0,"user1",0,"badpass">>)
|
step1 = :cyrsasl.server_start(context[:cyrstate], "PLAIN", <<0,"user1",0,"badpass">>)
|
||||||
assert step1 == {:error, :"not-authorized", "user1"}
|
assert step1 == {:error, :not_authorized, "user1"}
|
||||||
end
|
end
|
||||||
|
|
||||||
test "Plain text (wrong user wrong pass)", context do
|
test "Plain text (wrong user wrong pass)", context do
|
||||||
step1 = :cyrsasl.server_start(context[:cyrstate], "PLAIN", <<0,"nouser1",0,"badpass">>)
|
step1 = :cyrsasl.server_start(context[:cyrstate], "PLAIN", <<0,"nouser1",0,"badpass">>)
|
||||||
assert step1 == {:error, :"not-authorized", "nouser1"}
|
assert step1 == {:error, :not_authorized, "nouser1"}
|
||||||
end
|
end
|
||||||
|
|
||||||
test "Anonymous", context do
|
test "Anonymous", context do
|
||||||
|
@ -63,15 +63,15 @@ defmodule EjabberdCyrsaslTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
test "Digest-MD5 (correct user wrong pass)", context do
|
test "Digest-MD5 (correct user wrong pass)", context do
|
||||||
assert {:error, :"not-authorized", "user1"} = process_digest_md5(context[:cyrstate], "user1", "domain1", "badpass")
|
assert {:error, :not_authorized, "user1"} = process_digest_md5(context[:cyrstate], "user1", "domain1", "badpass")
|
||||||
end
|
end
|
||||||
|
|
||||||
test "Digest-MD5 (wrong user correct pass)", context do
|
test "Digest-MD5 (wrong user correct pass)", context do
|
||||||
assert {:error, :"not-authorized", "baduser"} = process_digest_md5(context[:cyrstate], "baduser", "domain1", "pass")
|
assert {:error, :not_authorized, "baduser"} = process_digest_md5(context[:cyrstate], "baduser", "domain1", "pass")
|
||||||
end
|
end
|
||||||
|
|
||||||
test "Digest-MD5 (wrong user and pass)", context do
|
test "Digest-MD5 (wrong user and pass)", context do
|
||||||
assert {:error, :"not-authorized", "baduser"} = process_digest_md5(context[:cyrstate], "baduser", "domain1", "badpass")
|
assert {:error, :not_authorized, "baduser"} = process_digest_md5(context[:cyrstate], "baduser", "domain1", "badpass")
|
||||||
end
|
end
|
||||||
|
|
||||||
defp process_digest_md5(cyrstate, user, domain, pass) do
|
defp process_digest_md5(cyrstate, user, domain, pass) do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue