-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: RosterManager: Fix wrong server to/from address
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,14 +117,14 @@ void tst_QXmppRosterManager::testAddItem() | |
auto *rosterManager = test.addNewExtension<QXmppRosterManager>(&test); | ||
|
||
auto future = rosterManager->addRosterItem("[email protected]"); | ||
test.expect("<iq id='qxmpp1' to='capulet.lit' type='set'><query xmlns='jabber:iq:roster'><item jid='[email protected]'/></query></iq>"); | ||
test.inject<QString>("<iq id='qxmpp1' from='capulet.lit' type='result'/>"); | ||
test.expect("<iq id='qxmpp1' type='set'><query xmlns='jabber:iq:roster'><item jid='[email protected]'/></query></iq>"); | ||
test.inject<QString>("<iq id='qxmpp1' type='result'/>"); | ||
expectFutureVariant<QXmpp::Success>(future); | ||
|
||
future = rosterManager->addRosterItem("[email protected]"); | ||
test.expect("<iq id='qxmpp1' to='capulet.lit' type='set'><query xmlns='jabber:iq:roster'><item jid='[email protected]'/></query></iq>"); | ||
test.expect("<iq id='qxmpp1' type='set'><query xmlns='jabber:iq:roster'><item jid='[email protected]'/></query></iq>"); | ||
test.inject<QString>(R"( | ||
<iq id='qxmpp1' from='capulet.lit' type='error'> | ||
<iq id='qxmpp1' type='error'> | ||
<error type='modify'> | ||
<not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> | ||
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>This is not allowed</text> | ||
|
@@ -143,14 +143,14 @@ void tst_QXmppRosterManager::testRemoveItem() | |
auto *rosterManager = test.addNewExtension<QXmppRosterManager>(&test); | ||
|
||
auto future = rosterManager->removeRosterItem("[email protected]"); | ||
test.expect("<iq id='qxmpp1' to='capulet.lit' type='set'><query xmlns='jabber:iq:roster'><item jid='[email protected]' subscription='remove'/></query></iq>"); | ||
test.inject<QString>("<iq id='qxmpp1' from='capulet.lit' type='result'/>"); | ||
test.expect("<iq id='qxmpp1' type='set'><query xmlns='jabber:iq:roster'><item jid='[email protected]' subscription='remove'/></query></iq>"); | ||
test.inject<QString>("<iq id='qxmpp1' type='result'/>"); | ||
expectFutureVariant<QXmpp::Success>(future); | ||
|
||
future = rosterManager->removeRosterItem("[email protected]"); | ||
test.expect("<iq id='qxmpp1' to='capulet.lit' type='set'><query xmlns='jabber:iq:roster'><item jid='[email protected]' subscription='remove'/></query></iq>"); | ||
test.expect("<iq id='qxmpp1' type='set'><query xmlns='jabber:iq:roster'><item jid='[email protected]' subscription='remove'/></query></iq>"); | ||
test.inject<QString>(R"( | ||
<iq id='qxmpp1' from='capulet.lit' type='error'> | ||
<iq id='qxmpp1' type='error'> | ||
<error type='cancel'> | ||
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> | ||
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Not found</text> | ||
|