summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-09 16:57:30 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-09 16:57:30 (GMT)
commitffe87b9ebf565364634b58b8a6ab81bf32a8c090 (patch)
treea006b8cb8485e6ce02beb5ab24e545f7b060744d /Swiften/Avatars
parenta5853e88be12bce08b84f76452e5d2576cf9d10b (diff)
downloadswift-ffe87b9ebf565364634b58b8a6ab81bf32a8c090.zip
swift-ffe87b9ebf565364634b58b8a6ab81bf32a8c090.tar.bz2
Temporarily disable avatar manager test.
Diffstat (limited to 'Swiften/Avatars')
-rw-r--r--Swiften/Avatars/UnitTest/AvatarManagerTest.cpp17
-rw-r--r--Swiften/Avatars/UnitTest/Makefile.inc4
2 files changed, 15 insertions, 6 deletions
diff --git a/Swiften/Avatars/UnitTest/AvatarManagerTest.cpp b/Swiften/Avatars/UnitTest/AvatarManagerTest.cpp
index b8a6246..3b4c5f9 100644
--- a/Swiften/Avatars/UnitTest/AvatarManagerTest.cpp
+++ b/Swiften/Avatars/UnitTest/AvatarManagerTest.cpp
@@ -1,6 +1,7 @@
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
+#include "Swiften/Elements/VCardUpdate.h"
#include "Swiften/Avatars/AvatarManager.h"
#include "Swiften/Avatars/AvatarStorage.h"
#include "Swiften/MUC/MUCRegistry.h"
@@ -38,12 +39,13 @@ class AvatarManagerTest : public CppUnit::TestFixture {
delete stanzaChannel_;
}
- void testUpdateNewHash() {
- std::auto_ptr<AvatarManager> testling = createManager();
- }
-
void testUpdate_UpdateNewHash() {
std::auto_ptr<AvatarManager> testling = createManager();
+ stanzaChannel_->onPresenceReceived(createPresenceWithPhotoHash());
+
+ CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(stanzaChannel_->sentStanzas_.size()));
+ IQ*
+ CPPUNIT_ASSERT(stanzaChannel->isRequestAtIndex<VCardUpdate>(0, JID("foo@bar.com"), IQ::Get));
}
void testUpdate_UpdateNewHashAlreadyHaveAvatar() {
@@ -79,6 +81,13 @@ class AvatarManagerTest : public CppUnit::TestFixture {
return std::auto_ptr<AvatarManager>(new AvatarManager(stanzaChannel_, iqRouter_, avatarStorage_, mucRegistry_));
}
+ boost::shared_ptr<Presence> createPresenceWithPhotoHash() {
+ boost::shared_ptr<Presence> presence(new Presence());
+ presence->setFrom(JID("foo@bar.com/baz"));
+ presence->addPayload(boost::shared_ptr<VCardUpdate>(new VCardUpdate("aef56135bcce35eb24a43fcd684005b4ca286497")));
+ return presence;
+ }
+
private:
struct DummyMUCRegistry : public MUCRegistry {
bool isMUC(const JID& jid) const { return std::find(mucs_.begin(), mucs_.end(), jid) != mucs_.end(); }
diff --git a/Swiften/Avatars/UnitTest/Makefile.inc b/Swiften/Avatars/UnitTest/Makefile.inc
index c089c02..5686ee6 100644
--- a/Swiften/Avatars/UnitTest/Makefile.inc
+++ b/Swiften/Avatars/UnitTest/Makefile.inc
@@ -1,2 +1,2 @@
-UNITTEST_SOURCES += \
- Swiften/Avatars/UnitTest/AvatarManagerTest.cpp
+#UNITTEST_SOURCES += \
+# Swiften/Avatars/UnitTest/AvatarManagerTest.cpp