Fixed tests
This commit is contained in:
parent
8c7caaf94a
commit
f16af993ce
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue