summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-02-22 17:22:26 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-02-22 17:22:45 +0100
commit7287dae6c279583e5c5f0fafd8207341cc5a15af (patch)
tree22457f7d5a7a8a0e050f72072ee146db1b4d3ff8 /tests
parent7748c2a5c1cc29a8c69ea051174e31b02af4a208 (diff)
downloadsink-7287dae6c279583e5c5f0fafd8207341cc5a15af.tar.gz
sink-7287dae6c279583e5c5f0fafd8207341cc5a15af.zip
Properly deal with filtered entities in reduced queries.
Filtered entities would still end up in the entities list before.
Diffstat (limited to 'tests')
-rw-r--r--tests/querytest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/querytest.cpp b/tests/querytest.cpp
index f65d477..52f0024 100644
--- a/tests/querytest.cpp
+++ b/tests/querytest.cpp
@@ -1211,7 +1211,7 @@ private slots:
1211 Query query; 1211 Query query;
1212 query.setId("testLivequeryThreadleaderChange"); 1212 query.setId("testLivequeryThreadleaderChange");
1213 query.setFlags(Query::LiveQuery); 1213 query.setFlags(Query::LiveQuery);
1214 query.reduce<Mail::Folder>(Query::Reduce::Selector::max<Mail::Date>()).count("count").collect<Mail::Folder>("folders"); 1214 query.reduce<Mail::Folder>(Query::Reduce::Selector::max<Mail::Date>()).count().collect<Mail::Folder>();
1215 query.sort<Mail::Date>(); 1215 query.sort<Mail::Date>();
1216 query.request<Mail::MessageId>(); 1216 query.request<Mail::MessageId>();
1217 query.filter<Mail::Important>(false); 1217 query.filter<Mail::Important>(false);
@@ -1224,8 +1224,8 @@ private slots:
1224 { 1224 {
1225 auto mail = model->data(model->index(0, 0, QModelIndex{}), Sink::Store::DomainObjectRole).value<Mail::Ptr>(); 1225 auto mail = model->data(model->index(0, 0, QModelIndex{}), Sink::Store::DomainObjectRole).value<Mail::Ptr>();
1226 QCOMPARE(mail->getMessageId(), QByteArray{"mail1"}); 1226 QCOMPARE(mail->getMessageId(), QByteArray{"mail1"});
1227 QCOMPARE(mail->getProperty("count").toInt(), 2); 1227 QCOMPARE(mail->count(), 2);
1228 QCOMPARE(mail->getProperty("folders").toList().size(), 2); 1228 QCOMPARE(mail->getCollectedProperty<Mail::Folder>().size(), 2);
1229 } 1229 }
1230 } 1230 }
1231 1231