Record.defrecord :ejabberd_commands, Record.extract(:ejabberd_commands, from_lib: "ejabberd/include/ejabberd_commands.hrl")
setup_all do
+ :ok = :ejabberd.start_app(:lager)
try do
:stringprep.start
rescue
_ -> :ok
end
:mnesia.start
- {:ok, _} = :jid.start
- :ejabberd_hooks.start_link
- :ok = :ejabberd_config.start(["domain1", "domain2"], [])
- {:ok, _} = :ejabberd_access_permissions.start_link()
- {:ok, _} = :acl.start_link
+ {:ok, _} = :jid.start
+ :ejabberd_hooks.start_link
+ :ok = :ejabberd_config.start(["domain1", "domain2"], [])
+ {:ok, _} = :ejabberd_access_permissions.start_link()
+ {:ok, _} = :acl.start_link
EjabberdOauthMock.init
- on_exit fn -> :meck.unload end
+ on_exit fn -> :meck.unload end
end
setup do
:meck.unload
:meck.new(@module, [:non_strict])
- :mnesia.delete_table(:ejabberd_commands)
+ :mnesia.delete_table(:ejabberd_commands)
:ejabberd_commands.start_link
+ :ok
end
test "API command can be registered, listed and unregistered" do
:ok = :ejabberd_config.start(["localhost"], [])
{:ok, _} = :ejabberd_access_permissions.start_link()
- :ejabberd_commands.init
+ :ejabberd_commands.start_link
:ok
end
use ExUnit.Case, async: true
setup_all do
+ :ok = :ejabberd.start_app(:lager)
:p1_sha.load_nif()
:mnesia.start
:ok = start_module(:stringprep)
{:ok, _} = start_module(:jid)
:ok = :ejabberd_config.start(["domain1"], [])
- :ok = :cyrsasl.start_link
+ {:ok, _} = :cyrsasl.start_link
cyrstate = :cyrsasl.server_new("domain1", "domain1", "domain1", :ok, &get_password/1,
&check_password/3, &check_password_digest/5)
setup_anonymous_mocks()