Actually we want to check only for it starting with the expected string

As this assert fails at the moment (it did even before my previous
commit), I can't be 100% sure it is correct now. So sue me. Or revert
both my changes.
This commit is contained in:
Tor Lillqvist 2016-04-27 14:17:53 +03:00
parent 8480cad8ee
commit ee7f8c158a

View file

@ -9,6 +9,7 @@
#include "config.h"
#include <algorithm>
#include <regex>
#include <Poco/DirectoryIterator.h>
@ -232,7 +233,7 @@ void HTTPWSTest::testHandShake()
{
// After document broker finish searching it sends editlok
// it should be at end on handshake
CPPUNIT_ASSERT_EQUAL(prefixEdit, std::string(buffer, bytes));
CPPUNIT_ASSERT_EQUAL(prefixEdit, std::string(buffer, std::min((std::string::size_type)bytes, prefixEdit.size())));
CPPUNIT_ASSERT(flags == Poco::Net::WebSocket::FRAME_TEXT);
payload = "statusindicator: connect";