mirror of https://github.com/nymea/nymea.git
fix time tests
parent
bc611ca8aa
commit
d4f2d9fc8e
|
|
@ -101,15 +101,15 @@ void HttpDaemon::readClient()
|
|||
qCDebug(dcMockDevice) << "Clear action history";
|
||||
m_actionList.clear();
|
||||
}
|
||||
|
||||
if (tokens[0] == "GET") {
|
||||
QTextStream os(socket);
|
||||
os.setAutoDetectUnicode(true);
|
||||
os << generateWebPage();
|
||||
socket->close();
|
||||
|
||||
if (socket->state() == QTcpSocket::UnconnectedState) {
|
||||
if (socket->state() == QTcpSocket::UnconnectedState)
|
||||
delete socket;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -500,12 +500,14 @@ void TestTimeManager::testCalendarItemHourly()
|
|||
GuhCore::instance()->timeManager()->setTime(QDateTime(currentDateTime.date(), QTime(future.time().hour(), 10)));
|
||||
verifyRuleExecuted(mockActionIdWithParams);
|
||||
cleanupMockHistory();
|
||||
cleanupMockHistory();
|
||||
|
||||
// inactive unchanged
|
||||
GuhCore::instance()->timeManager()->setTime(QDateTime(currentDateTime.date(), QTime(future.time().hour(), 11)));
|
||||
verifyRuleNotExecuted();
|
||||
|
||||
// One hour "Back to the future"
|
||||
future = future.addSecs(3*60*60);
|
||||
// 'i' hours "Back to the future"
|
||||
future = future.addSecs(i*60*60);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue