diff options
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 } |