Switched QHttpSocket to require a QTcpSocket.

This commit is contained in:
Nathan Osman
2015-06-17 19:28:07 -07:00
parent a4e041dc0f
commit b2810eb3c5
4 changed files with 28 additions and 24 deletions

View File

@@ -29,6 +29,7 @@
#include <QTemporaryDir>
#include <QTest>
#include "common/qsocketpair.h"
#include "core/qhttpsocket.h"
#include "handler/qfilesystemhandler.h"
@@ -85,8 +86,10 @@ void TestQFilesystemHandler::testRequests()
QFilesystemHandler handler(QDir(dir.path()).absoluteFilePath("root"));
QBuffer buffer;
QHttpSocket socket(&buffer);
QSocketPair pair;
QTRY_VERIFY(pair.isConnected());
QHttpSocket socket(pair.server());
QCOMPARE(handler.process(&socket, path), process);
}