Skip to content

Commit

Permalink
Update push suites
Browse files Browse the repository at this point in the history
- Expect map instead of list (internal format has changed)
- Remove test repetition
  • Loading branch information
chrzaszcz committed May 30, 2023
1 parent 9a93172 commit 4ff9d5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions big_tests/tests/push_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ all() ->
].

groups() ->
G = [
[
{toggling, [parallel], [
enable_should_fail_with_missing_attributes,
enable_should_fail_with_invalid_attributes,
Expand Down Expand Up @@ -68,8 +68,7 @@ groups() ->
muclight_msg_notify_if_user_offline_with_publish_options,
muclight_msg_notify_stops_after_disabling
]}
],
ct_helper:repeat_all_until_all_ok(G).
].

notification_groups() ->
[
Expand Down
4 changes: 2 additions & 2 deletions big_tests/tests/push_integration_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,8 @@ add_user_server_to_whitelist(User, {NodeAddr, NodeName}) ->
assert_push_notification_in_session(User, NodeName, Service, DeviceToken) ->
Info = mongoose_helper:get_session_info(?RPC_SPEC, User),
{_JID, NodeName, Details} = maps:get(?SESSION_KEY, Info),
?assertMatch({<<"service">>, Service}, lists:keyfind(<<"service">>, 1, Details)),
?assertMatch({<<"device_id">>, DeviceToken}, lists:keyfind(<<"device_id">>, 1, Details)).
?assertMatch(#{<<"service">> := Service}, Details),
?assertMatch(#{<<"device_id">> := DeviceToken}, Details).

wait_for_push_request(DeviceToken) ->
mongoose_push_mock:wait_for_push_request(DeviceToken, 10000).
Expand Down

0 comments on commit 4ff9d5a

Please sign in to comment.