Changeset - f16af993ce28
[Not reviewed]
0 1 0
Jan Kaluza - 13 years ago 2012-11-14 13:49:52
hanzz.k@gmail.com
Fixed tests
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/tests/usermanager.cpp
Show inline comments
 
@@ -137,6 +137,16 @@ class UserManagerTest : public CPPUNIT_NS :: TestFixture, public BasicTest {
 
		dynamic_cast<Swift::ServerStanzaChannel *>(component->getStanzaChannel())->onPresenceReceived(response);
 
		loop->processEvents();
 

	
 
		CPPUNIT_ASSERT_EQUAL(0, (int) received.size());
 

	
 
		response = Swift::Presence::create();
 
		response->setTo("localhost");
 
		response->setFrom("user@localhost");
 
		response->setType(Swift::Presence::Error);
 
		response->addPayload(boost::shared_ptr<Swift::ErrorPayload>(new Swift::ErrorPayload(Swift::ErrorPayload::SubscriptionRequired)));
 
		dynamic_cast<Swift::ServerStanzaChannel *>(component->getStanzaChannel())->onPresenceReceived(response);
 
		loop->processEvents();
 

	
 
		CPPUNIT_ASSERT_EQUAL(1, (int) received.size());
 
		presence = dynamic_cast<Swift::Presence *>(getStanza(received[0]));
 
		CPPUNIT_ASSERT(presence);
0 comments (0 inline, 0 general)