aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPouriya <pouriya.jahanbakhsh@gmail.com>2022-01-21 03:14:28 +0330
committerGitHub <noreply@github.com>2022-01-21 03:14:28 +0330
commit03485f5e940326a9fdbcf2ecd1918b2772003a6a (patch)
tree5ce253cdd24e11f0f2bd90babbbf0bc38e38c575 /test
parentMerge branch 'processone:master' into master (diff)
parentmod_pubsub: Allow for limiting item_expire value (diff)
Merge branch 'processone:master' into master
Diffstat (limited to 'test')
-rw-r--r--test/roster_tests.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/roster_tests.erl b/test/roster_tests.erl
index a3b6009c9..3092b8cd8 100644
--- a/test/roster_tests.erl
+++ b/test/roster_tests.erl
@@ -224,13 +224,21 @@ get_items(Config, Version) ->
sub_els = [#roster_query{ver = Version}]}) of
#iq{type = result,
sub_els = [#roster_query{ver = NewVersion, items = Items}]} ->
- {NewVersion, Items};
+ {NewVersion, normalize_items(Items)};
#iq{type = result, sub_els = []} ->
{empty, []};
#iq{type = error} = Err ->
xmpp:get_error(Err)
end.
+normalize_items(Items) ->
+ Items2 =
+ lists:map(
+ fun(I) ->
+ I#roster_item{groups = lists:sort(I#roster_item.groups)}
+ end, Items),
+ lists:sort(Items2).
+
get_item(Config, JID) ->
case get_items(Config) of
{_Ver, Items} when is_list(Items) ->