allow identifiers in the test setup

This commit is contained in:
Christian Heusel
2022-11-07 23:15:51 +01:00
parent fecdd98958
commit 8562f61304
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -72,11 +72,15 @@ Socket ZNCTest::ConnectClient() {
return WrapIO(&sock);
}
Socket ZNCTest::LoginClient() {
Socket ZNCTest::LoginClient(QString identifier) {
auto client = ConnectClient();
client.Write("PASS :hunter2");
client.Write("NICK nick");
client.Write("USER user/test x x :x");
if ( identifier.length() == 0 ) {
client.Write("USER user/test x x :x");
} else {
client.Write("USER user@" + identifier.toUtf8() + "/test x x :x");
}
return client;
}
+1 -1
View File
@@ -37,7 +37,7 @@ class ZNCTest : public testing::Test {
Socket ConnectIRCd();
Socket ConnectClient();
Socket LoginClient();
Socket LoginClient(QString identifier = "");
std::unique_ptr<Process> Run();