summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/accountstest.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/accountstest.cpp b/tests/accountstest.cpp
index 12e4685..5a63b31 100644
--- a/tests/accountstest.cpp
+++ b/tests/accountstest.cpp
@@ -101,20 +101,19 @@ private slots:
101 Query query; 101 Query query;
102 query.liveQuery = true; 102 query.liveQuery = true;
103 auto model = Store::loadModel<SinkAccount>(query); 103 auto model = Store::loadModel<SinkAccount>(query);
104 QSignalSpy spy(model.data(), &QAbstractItemModel::rowsInserted); 104 QTRY_COMPARE(model->rowCount(QModelIndex()), 1);
105 QTRY_COMPARE(spy.count(), 1);
106 105
107 auto account2 = ApplicationDomainType::createEntity<SinkAccount>(); 106 auto account2 = ApplicationDomainType::createEntity<SinkAccount>();
108 account2.setProperty("type", "maildir"); 107 account2.setProperty("type", "maildir");
109 account2.setProperty("name", "name"); 108 account2.setProperty("name", "name");
110 Store::create(account2).exec().waitForFinished(); 109 Store::create(account2).exec().waitForFinished();
111 QTRY_COMPARE(spy.count(), 2); 110 QTRY_COMPARE(model->rowCount(QModelIndex()), 2);
112 111
113 //Ensure the notifier only affects one type 112 //Ensure the notifier only affects one type
114 auto resource = ApplicationDomainType::createEntity<SinkResource>(); 113 auto resource = ApplicationDomainType::createEntity<SinkResource>();
115 resource.setProperty("type", "org.kde.mailtransport"); 114 resource.setProperty("type", "org.kde.mailtransport");
116 Store::create(resource).exec().waitForFinished(); 115 Store::create(resource).exec().waitForFinished();
117 QTRY_COMPARE(spy.count(), 2); 116 QTRY_COMPARE(model->rowCount(QModelIndex()), 2);
118 } 117 }
119 118
120}; 119};