diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2020-04-01 12:45:01 +0300 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2020-04-01 12:45:01 +0300 |
commit | a5ea3fa28279c3058aed2a0205cb517a925b6014 (patch) | |
tree | acb804fd1f36473c3ea96d43e8c38c231386c03e | |
parent | 6c52438128bec87bfa1b80f0a6599a6ba63a78cc (diff) |
Better error reporting in pubsub tests
-rw-r--r-- | test/pubsub_tests.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/pubsub_tests.erl b/test/pubsub_tests.erl index 48ba3e849..af66a9f48 100644 --- a/test/pubsub_tests.erl +++ b/test/pubsub_tests.erl @@ -30,6 +30,7 @@ recv_message/1, my_jid/1, send/2, recv_presence/1, recv/1]). -include("suite.hrl"). +-include_lib("stdlib/include/assert.hrl"). %%%=================================================================== %%% API @@ -187,8 +188,8 @@ test_unsubscribe(Config) -> test_get_affiliations(Config) -> Nodes = lists:sort([create_node(Config, <<>>) || _ <- lists:seq(1, 5)]), Affs = get_affiliations(Config), - Nodes = lists:sort([Node || #ps_affiliation{node = Node, - type = owner} <- Affs]), + ?assertEqual(Nodes, lists:sort([Node || #ps_affiliation{node = Node, + type = owner} <- Affs])), [delete_node(Config, Node) || Node <- Nodes], disconnect(Config). @@ -196,7 +197,7 @@ test_get_subscriptions(Config) -> Nodes = lists:sort([create_node(Config, <<>>) || _ <- lists:seq(1, 5)]), [subscribe_node(Config, Node) || Node <- Nodes], Subs = get_subscriptions(Config), - Nodes = lists:sort([Node || #ps_subscription{node = Node} <- Subs]), + ?assertEqual(Nodes, lists:sort([Node || #ps_subscription{node = Node} <- Subs])), [delete_node(Config, Node) || Node <- Nodes], disconnect(Config). |