mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Do not check the data for requests that don't expect any
The public postman-echo service returns different data
This commit is contained in:
parent
4d02987365
commit
6c1273dbbd
|
@ -399,7 +399,7 @@ TEST_F(PluginTest, testHttp)
|
|||
QString error;
|
||||
|
||||
NetworkRequestType meth = NetworkRequestType::Get;
|
||||
QByteArray data;
|
||||
QByteArray data; // null means do not check
|
||||
};
|
||||
|
||||
std::vector<RequestCase> cases{
|
||||
|
@ -447,8 +447,11 @@ TEST_F(PluginTest, testHttp)
|
|||
EXPECT_EQ((*lua)["status"], sol::nil);
|
||||
}
|
||||
EXPECT_EQ(lua->get<QString>("error"), c.error);
|
||||
if (!c.data.isNull())
|
||||
{
|
||||
EXPECT_EQ(lua->get<QByteArray>("data"), c.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
const QByteArray TEST_FILE_DATA = "Test file data\nWith a new line.\n";
|
||||
|
||||
|
|
Loading…
Reference in a new issue