From 03f91093dcfd8c7adb3b1ddabbf006ca8e0586a1 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 13 Dec 2015 20:12:15 +0100 Subject: Ensure we process the query also if no resource is available. --- tests/clientapitest.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/clientapitest.cpp b/tests/clientapitest.cpp index 5777e68..3a088f8 100644 --- a/tests/clientapitest.cpp +++ b/tests/clientapitest.cpp @@ -103,6 +103,16 @@ private Q_SLOTS: QCOMPARE(model->rowCount(QModelIndex()), 1); } + void testLoadWithoutResource() + { + Akonadi2::Query query; + query.resources << "nonexisting.resource"; + query.liveQuery = false; + + auto model = Akonadi2::Store::loadModel(query); + QTRY_VERIFY(model->data(QModelIndex(), Akonadi2::Store::ChildrenFetchedRole).toBool()); + } + //TODO: This test doesn't belong to this testsuite void resourceManagement() { -- cgit v1.2.3