From 7e561dd20a9726c311176480b0900843c8988000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Thu, 25 Jan 2018 18:43:34 +0100 Subject: [PATCH] Fix more tests --- test/carbons_tests.erl | 4 ++-- test/csi_tests.erl | 4 ++-- test/mam_tests.erl | 4 ++-- test/mix_tests.erl | 6 +++--- test/pubsub_tests.erl | 2 +- test/push_tests.erl | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/carbons_tests.erl b/test/carbons_tests.erl index f703bb2c8..8f31a4231 100644 --- a/test/carbons_tests.erl +++ b/test/carbons_tests.erl @@ -169,11 +169,11 @@ recv_carbons(Config) -> recv_message(Config), case Dir of send -> - #carbons_sent{forwarded = #forwarded{xml_els = [El]}} = + #carbons_sent{forwarded = #forwarded{sub_els = [El]}} = xmpp:get_subtag(CarbonMsg, #carbons_sent{}), #message{body = Body} = xmpp:decode(El); recv -> - #carbons_received{forwarded = #forwarded{xml_els = [El]}}= + #carbons_received{forwarded = #forwarded{sub_els = [El]}}= xmpp:get_subtag(CarbonMsg, #carbons_received{}), #message{body = Body} = xmpp:decode(El) end; diff --git a/test/csi_tests.erl b/test/csi_tests.erl index a539c9c24..f9d47d55f 100644 --- a/test/csi_tests.erl +++ b/test/csi_tests.erl @@ -69,7 +69,7 @@ all_master(Config) -> items = [#ps_item{ id = <<"pep-1">>, - xml_els = [PepPayload]}]}}]}, + sub_els = [PepPayload]}]}}]}, PepTwo = #message{ to = Peer, sub_els = @@ -80,7 +80,7 @@ all_master(Config) -> items = [#ps_item{ id = <<"pep-2">>, - xml_els = [PepPayload]}]}}]}, + sub_els = [PepPayload]}]}}]}, %% Wait for the slave to become inactive. wait_for_slave(Config), %% Should be queued (but see below): diff --git a/test/mam_tests.erl b/test/mam_tests.erl index f136d31ba..daaf2419f 100644 --- a/test/mam_tests.erl +++ b/test/mam_tests.erl @@ -361,7 +361,7 @@ recv_archived_messages(Config, From, To, QID, Range) -> sub_els = [#forwarded{ delay = #delay{}, - xml_els = [El]}]}]} = recv_message(Config), + sub_els = [El]}]}]} = recv_message(Config), #message{from = From, to = To, body = Body} = xmpp:decode(El) end, Range). @@ -443,7 +443,7 @@ recv_messages_from_room(Config, Range) -> sub_els = [#forwarded{ delay = #delay{}, - xml_els = [El]}]}]} = recv_message(Config), + sub_els = [El]}]}]} = recv_message(Config), #message{from = MyNickJID, type = groupchat, body = Body} = xmpp:decode(El) diff --git a/test/mix_tests.erl b/test/mix_tests.erl index 74e83d2b2..38f1307ce 100644 --- a/test/mix_tests.erl +++ b/test/mix_tests.erl @@ -85,7 +85,7 @@ all_master(Config) -> node = ?NS_MIX_NODES_PARTICIPANTS, items = [#ps_item{ id = ParticipantID, - xml_els = [PXML]}]}}]} = + sub_els = [PXML]}]}}]} = recv_message(Config), #mix_participant{jid = MyBareJID} = xmpp:decode(PXML), %% Coming online @@ -106,7 +106,7 @@ all_master(Config) -> node = ?NS_MIX_NODES_PRESENCE, items = [#ps_item{ id = PresenceID, - xml_els = [Presence]}]}}]}), + sub_els = [Presence]}]}}]}), #message{from = Room, sub_els = [#ps_event{ @@ -114,7 +114,7 @@ all_master(Config) -> node = ?NS_MIX_NODES_PRESENCE, items = [#ps_item{ id = PresenceID, - xml_els = [Presence]}]}}]} = + sub_els = [Presence]}]}}]} = recv_message(Config), %% Coming offline send(Config, #presence{type = unavailable, to = Room}), diff --git a/test/pubsub_tests.erl b/test/pubsub_tests.erl index 92423c9d9..ca0445afc 100644 --- a/test/pubsub_tests.erl +++ b/test/pubsub_tests.erl @@ -599,7 +599,7 @@ set_node_config(Config, Node, Options) -> publish_item(Config, Node) -> PJID = pubsub_jid(Config), ItemID = randoms:get_string(), - Item = #ps_item{id = ItemID, xml_els = [xmpp:encode(#presence{id = ItemID})]}, + Item = #ps_item{id = ItemID, sub_els = [xmpp:encode(#presence{id = ItemID})]}, case send_recv(Config, #iq{type = set, to = PJID, sub_els = [#pubsub{publish = #ps_publish{ diff --git a/test/push_tests.erl b/test/push_tests.erl index b1f3a8b78..505aa90f5 100644 --- a/test/push_tests.erl +++ b/test/push_tests.erl @@ -220,7 +220,7 @@ recv_test_message(Config) -> handle_notification(Config) -> From = server_jid(Config), - Item = #ps_item{xml_els = [xmpp:encode(#push_notification{})]}, + Item = #ps_item{sub_els = [xmpp:encode(#push_notification{})]}, Publish = #ps_publish{node = ?PUSH_NODE, items = [Item]}, XData = #xdata{type = submit, fields = ?PUSH_XDATA_FIELDS}, PubSub = #pubsub{publish = Publish, publish_options = XData},