25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Fix error return expectation in command test

This commit is contained in:
Mickael Remond 2016-08-01 09:28:54 +02:00
parent c5c394e929
commit 4982639d05
No known key found for this signature in database
GPG Key ID: E6F6045D79965AA3

View File

@ -174,7 +174,7 @@ defmodule EjabberdCommandsMockTest do
# default version is latest one # default version is latest one
assert :result3 == :ejabberd_commands.execute_command(command_name, []) assert :result3 == :ejabberd_commands.execute_command(command_name, [])
# no such command in APIv0 # no such command in APIv0
assert :unknown_command == assert {:error, :unknown_command} ==
catch_throw :ejabberd_commands.execute_command(command_name, [], 0) catch_throw :ejabberd_commands.execute_command(command_name, [], 0)
assert :result1 == :ejabberd_commands.execute_command(command_name, [], 1) assert :result1 == :ejabberd_commands.execute_command(command_name, [], 1)
assert :result1 == :ejabberd_commands.execute_command(command_name, [], 2) assert :result1 == :ejabberd_commands.execute_command(command_name, [], 2)