other small fixes
This commit is contained in:
parent
adff8306b3
commit
a225423b73
@ -89,7 +89,7 @@ private slots:
|
|||||||
void TestRules::cleanupMockHistory() {
|
void TestRules::cleanupMockHistory() {
|
||||||
QNetworkAccessManager nam;
|
QNetworkAccessManager nam;
|
||||||
QSignalSpy spy(&nam, SIGNAL(finished(QNetworkReply*)));
|
QSignalSpy spy(&nam, SIGNAL(finished(QNetworkReply*)));
|
||||||
QNetworkRequest request(QUrl(QString("http://localhost:%1/clearactionhistory").arg(m_mockDevice1Port).arg(mockEvent1Id.toString())));
|
QNetworkRequest request(QUrl(QString("http://localhost:%1/clearactionhistory").arg(QString::number(m_mockDevice1Port))));
|
||||||
QNetworkReply *reply = nam.get(request);
|
QNetworkReply *reply = nam.get(request);
|
||||||
spy.wait(1000);
|
spy.wait(1000);
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
@ -132,7 +132,7 @@ void TestRules::verifyRuleExecuted(const ActionTypeId &actionTypeId)
|
|||||||
// Verify rule got executed
|
// Verify rule got executed
|
||||||
QNetworkAccessManager nam;
|
QNetworkAccessManager nam;
|
||||||
QSignalSpy spy(&nam, SIGNAL(finished(QNetworkReply*)));
|
QSignalSpy spy(&nam, SIGNAL(finished(QNetworkReply*)));
|
||||||
QNetworkRequest request(QUrl(QString("http://localhost:%1/actionhistory").arg(m_mockDevice1Port)));
|
QNetworkRequest request(QUrl(QString("http://localhost:%1/actionhistory").arg(QString::number(m_mockDevice1Port))));
|
||||||
QNetworkReply *reply = nam.get(request);
|
QNetworkReply *reply = nam.get(request);
|
||||||
spy.wait(1000);
|
spy.wait(1000);
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
@ -148,7 +148,7 @@ void TestRules::verifyRuleNotExecuted()
|
|||||||
{
|
{
|
||||||
QNetworkAccessManager nam;
|
QNetworkAccessManager nam;
|
||||||
QSignalSpy spy(&nam, SIGNAL(finished(QNetworkReply*)));
|
QSignalSpy spy(&nam, SIGNAL(finished(QNetworkReply*)));
|
||||||
QNetworkRequest request(QUrl(QString("http://localhost:%1/actionhistory").arg(m_mockDevice1Port)));
|
QNetworkRequest request(QUrl(QString("http://localhost:%1/actionhistory").arg(QString::number(m_mockDevice1Port))));
|
||||||
QNetworkReply *reply = nam.get(request);
|
QNetworkReply *reply = nam.get(request);
|
||||||
spy.wait();
|
spy.wait();
|
||||||
QCOMPARE(spy.count(), 1);
|
QCOMPARE(spy.count(), 1);
|
||||||
@ -972,7 +972,6 @@ void TestRules::loadStoreConfig()
|
|||||||
validActionEventBasedParam2.insert("value", false);
|
validActionEventBasedParam2.insert("value", false);
|
||||||
validActionEventBased.insert("ruleActionParams", QVariantList() << validActionEventBasedParam1 << validActionEventBasedParam2);
|
validActionEventBased.insert("ruleActionParams", QVariantList() << validActionEventBasedParam1 << validActionEventBasedParam2);
|
||||||
|
|
||||||
|
|
||||||
QVariantList validEventDescriptors3;
|
QVariantList validEventDescriptors3;
|
||||||
QVariantMap validEventDescriptor3;
|
QVariantMap validEventDescriptor3;
|
||||||
validEventDescriptor3.insert("eventTypeId", mockEvent2Id);
|
validEventDescriptor3.insert("eventTypeId", mockEvent2Id);
|
||||||
|
|||||||
Reference in New Issue
Block a user