tests: move UpdateManager test from testpreferences

Remove UpdateManager test in testpreferences
add the same UpdateManager tests to testqPrefUpdateManager

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-08-04 11:25:57 +02:00 committed by Dirk Hohndel
parent 4ce7a2e30c
commit 9341ea6eef
3 changed files with 30 additions and 20 deletions

View file

@ -262,26 +262,6 @@ void TestPreferences::testPreferences()
TEST(location->timeThreshold(), 30);
TEST(location->distanceThreshold(), 40);
auto update = qPrefUpdateManager::instance();
QDate date = QDate::currentDate();
update->set_dont_check_for_updates(true);
update->set_last_version_used("tomaz-1");
update->set_next_check(date);
TEST(update->dont_check_for_updates(), true);
TEST(update->last_version_used(), QStringLiteral("tomaz-1"));
TEST(update->next_check(), date);
date = date.addDays(3);
update->set_dont_check_for_updates(false);
update->set_last_version_used("tomaz-2");
update->set_next_check(date);
TEST(update->dont_check_for_updates(), false);
TEST(update->last_version_used(), QStringLiteral("tomaz-2"));
TEST(update->next_check(), date);
}
QTEST_MAIN(TestPreferences)