diff options
author | jan Iversen <jani@apache.org> | 2018-08-19 14:55:52 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-25 11:49:47 -0700 |
commit | b7a1bb670ce11b22e52361f4152b4853b97e13f5 (patch) | |
tree | 2ba1f77b8b34b9bcbfa46358feab90cb9152dfc3 /tests | |
parent | 5dd0981961f367054e38b164804548e7d9b16bfa (diff) | |
download | subsurface-b7a1bb670ce11b22e52361f4152b4853b97e13f5.tar.gz |
core/tests: add loadFromCloud var to qPrefCloudStorage
Add special property loadFromCloud + mail to qPrefCloudStorage
this variable is used by qmlmanager.cpp
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testqPrefCloudStorage.cpp | 14 | ||||
-rw-r--r-- | tests/testqPrefCloudStorage.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/testqPrefCloudStorage.cpp b/tests/testqPrefCloudStorage.cpp index 2ca2bb81a..2c6a4449f 100644 --- a/tests/testqPrefCloudStorage.cpp +++ b/tests/testqPrefCloudStorage.cpp @@ -266,4 +266,18 @@ void TestQPrefCloudStorage::test_oldPreferences() TEST(cloud->cloud_verification_status(), 1); } +void TestQPrefCloudStorage::test_loadFromCloud_var() +{ + auto cloud = qPrefCloudStorage::instance(); + + cloud->set_loadFromCloud("mail1", true); + cloud->set_loadFromCloud("mail2", false); + cloud->set_loadFromCloud("mail3", true); + + QCOMPARE(cloud->loadFromCloud("mail1"), true); + QCOMPARE(cloud->loadFromCloud("mail2"), false); + QCOMPARE(cloud->loadFromCloud("mail3"), true); + QCOMPARE(cloud->loadFromCloud("mail_unknown"), false); +} + QTEST_MAIN(TestQPrefCloudStorage) diff --git a/tests/testqPrefCloudStorage.h b/tests/testqPrefCloudStorage.h index 077ca74b6..e853c11ae 100644 --- a/tests/testqPrefCloudStorage.h +++ b/tests/testqPrefCloudStorage.h @@ -15,6 +15,7 @@ private slots: void test_struct_disk(); void test_multiple(); void test_oldPreferences(); + void test_loadFromCloud_var(); }; #endif // TESTQPREFCLOUDSTORAGE_H |