summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-08-28 10:01:54 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-08-28 10:01:54 (GMT)
commitb1a9a1b61ebce0f64d656006a85607c8c8491f4a (patch)
treea3157084893c6fa0f41f85a4de1b36f280334c02 /Swiften/Disco/UnitTest
parent66f820c2c7e2d7c6d883c995bf7b2da37aa963c7 (diff)
parent2faca4242e4de2568eb917df83fd1b9c21f33897 (diff)
downloadswift-b1a9a1b61ebce0f64d656006a85607c8c8491f4a.zip
swift-b1a9a1b61ebce0f64d656006a85607c8c8491f4a.tar.bz2
Merge branch 'swift-1.x'
* swift-1.x: Remove relaxation of not checking JIDs if the IQRouter's JID isn't set. Fixed Request::isAccountJID(). Check sender on incoming IQ responses.
Diffstat (limited to 'Swiften/Disco/UnitTest')
-rw-r--r--Swiften/Disco/UnitTest/CapsManagerTest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Swiften/Disco/UnitTest/CapsManagerTest.cpp b/Swiften/Disco/UnitTest/CapsManagerTest.cpp
index 6d4be30..699e96f 100644
--- a/Swiften/Disco/UnitTest/CapsManagerTest.cpp
+++ b/Swiften/Disco/UnitTest/CapsManagerTest.cpp
@@ -124,7 +124,7 @@ class CapsManagerTest : public CppUnit::TestFixture {
void testReceiveSameHashFromDifferentUserAfterFailedDiscoRequestsDisco() {
boost::shared_ptr<CapsManager> testling = createManager();
sendPresenceWithCaps(user1, capsInfo1);
- stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getID()));
+ stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID()));
stanzaChannel->sentStanzas.clear();
sendPresenceWithCaps(user2, capsInfo1);
@@ -175,7 +175,7 @@ class CapsManagerTest : public CppUnit::TestFixture {
boost::shared_ptr<CapsManager> testling = createManager();
sendPresenceWithCaps(user1, capsInfo1);
sendPresenceWithCaps(user2, capsInfo1alt);
- stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getID()));
+ stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID()));
CPPUNIT_ASSERT(stanzaChannel->isRequestAtIndex<DiscoInfo>(1, user2, IQ::Get));
boost::shared_ptr<DiscoInfo> discoInfo(stanzaChannel->sentStanzas[1]->getPayload<DiscoInfo>());
@@ -188,8 +188,8 @@ class CapsManagerTest : public CppUnit::TestFixture {
sendPresenceWithCaps(user1, capsInfo1);
sendPresenceWithCaps(user2, capsInfo1alt);
sendPresenceWithCaps(user3, capsInfo1);
- stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getID()));
- stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[1]->getID()));
+ stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID()));
+ stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[1]->getTo(), stanzaChannel->sentStanzas[1]->getID()));
CPPUNIT_ASSERT(stanzaChannel->isRequestAtIndex<DiscoInfo>(2, user3, IQ::Get));
}
@@ -197,7 +197,7 @@ class CapsManagerTest : public CppUnit::TestFixture {
void testReceiveSameHashFromFailingUserAfterReconnectRequestsDisco() {
boost::shared_ptr<CapsManager> testling = createManager();
sendPresenceWithCaps(user1, capsInfo1);
- stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getID()));
+ stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID()));
stanzaChannel->setAvailable(false);
stanzaChannel->setAvailable(true);
stanzaChannel->sentStanzas.clear();
@@ -215,7 +215,7 @@ class CapsManagerTest : public CppUnit::TestFixture {
stanzaChannel->setAvailable(true);
stanzaChannel->sentStanzas.clear();
sendPresenceWithCaps(user1, capsInfo1);
- stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getID()));
+ stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID()));
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(stanzaChannel->sentStanzas.size()));
}
@@ -251,7 +251,7 @@ class CapsManagerTest : public CppUnit::TestFixture {
}
void sendDiscoInfoResult(boost::shared_ptr<DiscoInfo> discoInfo) {
- stanzaChannel->onIQReceived(IQ::createResult(JID("baz@fum.com/dum"), stanzaChannel->sentStanzas[0]->getID(), discoInfo));
+ stanzaChannel->onIQReceived(IQ::createResult(JID("baz@fum.com/dum"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID(), discoInfo));
}
private: