Commit 3ba7fef5 authored by Volker Krause's avatar Volker Krause
Browse files

Fix HTTP response content type tests with newer PHP5 versions

parent 7cfd98fe
......@@ -100,7 +100,7 @@ private slots:
reply = RESTApi::listProducts(&client);
QVERIFY(waitForFinished(reply));
QCOMPARE(reply->error(), QNetworkReply::NoError);
QCOMPARE(reply->header(QNetworkRequest::ContentTypeHeader).toString(), QLatin1String("text/json"));
QVERIFY(reply->header(QNetworkRequest::ContentTypeHeader).toString().startsWith(QLatin1String("text/json")));
const auto products = Product::fromJson(reply->readAll());
QVERIFY(!findProduct(products, QLatin1String("org.kde.UserFeedback.UnitTestProduct")).isValid());
......
......@@ -101,7 +101,7 @@ private slots:
// retrieve data
reply = RESTApi::listSamples(&client, p);
QVERIFY(waitForFinished(reply));
QCOMPARE(reply->header(QNetworkRequest::ContentTypeHeader).toString(), QLatin1String("text/json"));
QVERIFY(reply->header(QNetworkRequest::ContentTypeHeader).toString().startsWith(QLatin1String("text/json")));
auto doc = QJsonDocument::fromJson(reply->readAll());
QVERIFY(doc.isArray());
auto a = doc.array();
......
......@@ -94,7 +94,7 @@ private slots:
auto reply = RESTApi::listSurveys(&client, p);
QVERIFY(waitForFinished(reply));
QCOMPARE(reply->error(), QNetworkReply::NoError);
QCOMPARE(reply->header(QNetworkRequest::ContentTypeHeader).toString(), QLatin1String("text/json"));
QVERIFY(reply->header(QNetworkRequest::ContentTypeHeader).toString().startsWith(QLatin1String("text/json")));
auto surveys = Survey::fromJson(reply->readAll());
QVERIFY(surveys.isEmpty());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment