diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-12-02 13:15:54 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-12-29 16:49:54 +0100 |
commit | 5f8093e6f985a7a887ffaa1e2fecd7314b5444c6 (patch) | |
tree | 20fe90121185373d1f561dcc04a61c6bd6766f8e /tests/auto/qwebsocket/tst_qwebsocket.cpp | |
parent | df320becb3d23ea99bf1ddfc190557e7a1729928 (diff) | |
download | qtwebsockets-5f8093e6f985a7a887ffaa1e2fecd7314b5444c6.tar.gz |
Task-number: QTBUG-42982
Change-Id: I50dbff96d7d64a5213e6ea6ba7bb9429b21b1fb2
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/qwebsocket/tst_qwebsocket.cpp')
-rw-r--r-- | tests/auto/qwebsocket/tst_qwebsocket.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qwebsocket/tst_qwebsocket.cpp b/tests/auto/qwebsocket/tst_qwebsocket.cpp index 0d1a46d..0e04ce1 100644 --- a/tests/auto/qwebsocket/tst_qwebsocket.cpp +++ b/tests/auto/qwebsocket/tst_qwebsocket.cpp @@ -471,6 +471,11 @@ void tst_QWebSocket::tst_sendTextMessage() isLastFrame = arguments.at(1).toBool(); QCOMPARE(frameReceived, QStringLiteral("Hello world!")); QVERIFY(isLastFrame); + + QString reason = QStringLiteral("going away"); + socket.close(QWebSocketProtocol::CloseCodeGoingAway, reason); + QCOMPARE(socket.closeCode(), QWebSocketProtocol::CloseCodeGoingAway); + QCOMPARE(socket.closeReason(), reason); #endif } |