summaryrefslogtreecommitdiffstats
path: root/tests/querytest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/querytest.cpp')
-rw-r--r--tests/querytest.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/querytest.cpp b/tests/querytest.cpp
index f0f0766..1192b87 100644
--- a/tests/querytest.cpp
+++ b/tests/querytest.cpp
@@ -43,6 +43,22 @@ private Q_SLOTS:
43 qDebug(); 43 qDebug();
44 } 44 }
45 45
46 void testNoResources()
47 {
48 //Test
49 Akonadi2::Query query;
50 query.resources << "foobar";
51 query.syncOnDemand = false;
52 query.processAll = false;
53 query.liveQuery = true;
54
55 //We fetch before the data is available and rely on the live query mechanism to deliver the actual data
56 auto model = Akonadi2::Store::loadModel<Akonadi2::ApplicationDomain::Mail>(query);
57 QTRY_VERIFY(model->data(QModelIndex(), Akonadi2::Store::ChildrenFetchedRole).toBool());
58 QCOMPARE(model->rowCount(), 0);
59 }
60
61
46 void testSingle() 62 void testSingle()
47 { 63 {
48 //Setup 64 //Setup