From: Mickael Remond Date: Mon, 1 Aug 2016 07:28:54 +0000 (+0200) Subject: Fix error return expectation in command test X-Git-Tag: 16.08~6^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4982639d054814270e566dbcef00247fbb933c12;p=ejabberd Fix error return expectation in command test --- diff --git a/test/ejabberd_commands_mock_test.exs b/test/ejabberd_commands_mock_test.exs index 439a3c1d3..9d33d7573 100644 --- a/test/ejabberd_commands_mock_test.exs +++ b/test/ejabberd_commands_mock_test.exs @@ -174,7 +174,7 @@ defmodule EjabberdCommandsMockTest do # default version is latest one assert :result3 == :ejabberd_commands.execute_command(command_name, []) # no such command in APIv0 - assert :unknown_command == + assert {:error, :unknown_command} == 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, [], 2)