diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-18 19:04:32 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-18 20:40:56 (GMT) |
commit | 4457bc810a326de8d7895b3f2ff36ade5f1ae1a0 (patch) | |
tree | 1556c4b0190453897d4799d23b05e651b0bb8a32 /Swiften/StreamStack/UnitTest | |
parent | 4052a822acd9da9dab6a8e2343c6170fb08dd8d6 (diff) | |
download | swift-contrib-4457bc810a326de8d7895b3f2ff36ade5f1ae1a0.zip swift-contrib-4457bc810a326de8d7895b3f2ff36ade5f1ae1a0.tar.bz2 |
Implement incoming linklocal connections.
Diffstat (limited to 'Swiften/StreamStack/UnitTest')
-rw-r--r-- | Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp b/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp index f60c370..e284ba9 100644 --- a/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp +++ b/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp @@ -3,6 +3,7 @@ #include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/TestFactoryRegistry.h> +#include "Swiften/Elements/ProtocolHeader.h" #include "Swiften/Elements/Presence.h" #include "Swiften/Base/ByteArray.h" #include "Swiften/StreamStack/XMPPLayer.h" @@ -68,9 +69,11 @@ class XMPPLayerTest : public CppUnit::TestFixture void testWriteHeader() { testling_->onWriteData.connect(boost::bind(&XMPPLayerTest::handleWriteData, this, _1)); - testling_->writeHeader("example.com"); + ProtocolHeader header; + header.setTo("example.com"); + testling_->writeHeader(header); - CPPUNIT_ASSERT_EQUAL(String("<?xml version=\"1.0\"?><stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" to=\"example.com\">"), dataReceived_); + CPPUNIT_ASSERT_EQUAL(String("<?xml version=\"1.0\"?><stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" to=\"example.com\" version=\"1.0\">"), dataReceived_); } void testWriteElement() { |