From 4a15e1cf36abb19ba8df2a322ce598997fbd7ffb Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 10 May 2025 20:59:40 +0100 Subject: [PATCH] Fix unit test after previous change See #1949 --- test/ClientTest.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/ClientTest.cpp b/test/ClientTest.cpp index 29bb2d84..55a15800 100644 --- a/test/ClientTest.cpp +++ b/test/ClientTest.cpp @@ -293,6 +293,16 @@ TEST_F(ClientTest, OnUserNoticeMessage) { } TEST_F(ClientTest, OnUserJoinMessage) { + // JOIN only is sent to server after registration is complete, so make sure + // it is complete. But it requires clearing the state afterwards. + m_pTestSock->ReadLine("001"); + m_pTestModule->vsHooks.clear(); + m_pTestModule->vsMessages.clear(); + m_pTestModule->vNetworks.clear(); + m_pTestModule->vClients.clear(); + m_pTestModule->vChannels.clear(); + m_pTestSock->vsLines.clear(); + CMessage msg("JOIN #chan key"); m_pTestModule->eAction = CModule::HALT; m_pTestClient->ReadLine(msg.ToString());