diff options
Diffstat (limited to 'tests')
-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 dfca947..ba75e3f 100644 --- a/tests/auto/qwebsocket/tst_qwebsocket.cpp +++ b/tests/auto/qwebsocket/tst_qwebsocket.cpp @@ -474,6 +474,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 } |