diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-12-28 12:05:34 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-02 13:31:14 +0100 |
commit | 625190d311adfcf3f0436cfece82249a92489348 (patch) | |
tree | 1010950e14b57560ae90abe20a5657750ad27137 /tests/querytest.cpp | |
parent | 11b790ba6f06141db802273628ce2d191982677e (diff) | |
download | sink-625190d311adfcf3f0436cfece82249a92489348.tar.gz sink-625190d311adfcf3f0436cfece82249a92489348.zip |
No parent query
Diffstat (limited to 'tests/querytest.cpp')
-rw-r--r-- | tests/querytest.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/querytest.cpp b/tests/querytest.cpp index 6279fa9..5af8a99 100644 --- a/tests/querytest.cpp +++ b/tests/querytest.cpp | |||
@@ -245,8 +245,6 @@ private slots: | |||
245 | auto model = Sink::Store::loadModel<Folder>(query); | 245 | auto model = Sink::Store::loadModel<Folder>(query); |
246 | QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); | 246 | QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); |
247 | QCOMPARE(model->rowCount(), 1); | 247 | QCOMPARE(model->rowCount(), 1); |
248 | model->fetchMore(model->index(0, 0)); | ||
249 | QTRY_VERIFY(model->data(model->index(0, 0), Sink::Store::ChildrenFetchedRole).toBool()); | ||
250 | QCOMPARE(model->rowCount(model->index(0, 0)), 1); | 248 | QCOMPARE(model->rowCount(model->index(0, 0)), 1); |
251 | } | 249 | } |
252 | 250 | ||
@@ -266,7 +264,6 @@ private slots: | |||
266 | auto model = Sink::Store::loadModel<Folder>(query); | 264 | auto model = Sink::Store::loadModel<Folder>(query); |
267 | QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); | 265 | QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); |
268 | QCOMPARE(model->rowCount(), 1); | 266 | QCOMPARE(model->rowCount(), 1); |
269 | model->fetchMore(model->index(0, 0)); | ||
270 | 267 | ||
271 | auto subfolder = ApplicationDomainType::createEntity<Folder>("sink.dummy.instance1"); | 268 | auto subfolder = ApplicationDomainType::createEntity<Folder>("sink.dummy.instance1"); |
272 | subfolder.setParent(folder.identifier()); | 269 | subfolder.setParent(folder.identifier()); |
@@ -274,9 +271,7 @@ private slots: | |||
274 | VERIFYEXEC(Sink::ResourceControl::flushMessageQueue("sink.dummy.instance1")); | 271 | VERIFYEXEC(Sink::ResourceControl::flushMessageQueue("sink.dummy.instance1")); |
275 | 272 | ||
276 | //Ensure the folder appears | 273 | //Ensure the folder appears |
277 | model->fetchMore(model->index(0, 0)); | 274 | QTRY_COMPARE(model->rowCount(model->index(0, 0)), 1); |
278 | QTRY_VERIFY(model->data(model->index(0, 0), Sink::Store::ChildrenFetchedRole).toBool()); | ||
279 | QCOMPARE(model->rowCount(model->index(0, 0)), 1); | ||
280 | 275 | ||
281 | //...and dissapears again after removal | 276 | //...and dissapears again after removal |
282 | VERIFYEXEC(Sink::Store::remove<Folder>(subfolder)); | 277 | VERIFYEXEC(Sink::Store::remove<Folder>(subfolder)); |