diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2013-07-03 23:33:19 +1000 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2013-07-07 02:19:10 +1000 |
commit | c262c08513dec4c12044412be287952772e8e9b5 (patch) | |
tree | be1b668f5a8af4f99495e543a5cdb977bf1d88a6 /test | |
parent | fix pubsub unsubscription without SubId on odbc (diff) |
Improve the XMPP codec, fix the test suite accordingly
Diffstat (limited to 'test')
-rw-r--r-- | test/ejabberd_SUITE.erl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/ejabberd_SUITE.erl b/test/ejabberd_SUITE.erl index 632633a57..88af3ff96 100644 --- a/test/ejabberd_SUITE.erl +++ b/test/ejabberd_SUITE.erl @@ -376,19 +376,22 @@ private(Config) -> <<"some.conference.org">>, <<>>)}, Storage = #bookmark_storage{conference = [Conference]}, + StorageXMLOut = xmpp_codec:encode(Storage), #iq{type = error} = send_recv(Config, #iq{type = get, sub_els = [#private{}], to = server_jid(Config)}), #iq{type = result, sub_els = []} = send_recv( Config, #iq{type = set, - sub_els = [#private{sub_els = [Storage]}]}), + sub_els = [#private{xml_els = [StorageXMLOut]}]}), #iq{type = result, - sub_els = [#private{sub_els = [Storage]}]} = + sub_els = [#private{xml_els = [StorageXMLIn]}]} = send_recv( Config, #iq{type = get, - sub_els = [#private{sub_els = [#bookmark_storage{}]}]}), + sub_els = [#private{xml_els = [xmpp_codec:encode( + #bookmark_storage{})]}]}), + Storage = xmpp_codec:decode(StorageXMLIn), disconnect(Config). last(Config) -> @@ -548,7 +551,8 @@ pubsub(Config) -> %% Publish <presence/> element within node "presence" ItemID = randoms:get_string(), Node = <<"presence">>, - Item = #pubsub_item{id = ItemID, sub_els = [#presence{}]}, + Item = #pubsub_item{id = ItemID, + xml_els = [xmpp_codec:encode(#presence{})]}, #iq{type = result, sub_els = [#pubsub{publish = #pubsub_publish{ node = Node, |