summaryrefslogtreecommitdiffstats
path: root/tests/clientapitest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-10 10:03:12 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-10 10:03:12 +0200
commitef91fc2c1fef8ed409aa60429afb4867d0dec568 (patch)
tree1edf39bc30f5d622ab76d8158b253fe1ef83c15d /tests/clientapitest.cpp
parent4999ec5da028e3b11d9c7b7bc0fe25acdf0a8ddd (diff)
downloadsink-ef91fc2c1fef8ed409aa60429afb4867d0dec568.tar.gz
sink-ef91fc2c1fef8ed409aa60429afb4867d0dec568.zip
Fixed resource property filtering
Diffstat (limited to 'tests/clientapitest.cpp')
-rw-r--r--tests/clientapitest.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/clientapitest.cpp b/tests/clientapitest.cpp
index 96982ca..7f9f422 100644
--- a/tests/clientapitest.cpp
+++ b/tests/clientapitest.cpp
@@ -119,34 +119,6 @@ private slots:
119 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); 119 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool());
120 } 120 }
121 121
122 // TODO: This test doesn't belong to this testsuite
123 void resourceManagement()
124 {
125 ResourceConfig::clear();
126 Sink::FacadeFactory::instance().registerStaticFacades();
127
128 Sink::ApplicationDomain::SinkResource res("", "dummyresource.identifier1", 0, QSharedPointer<Sink::ApplicationDomain::MemoryBufferAdaptor>::create());
129 res.setProperty("identifier", "dummyresource.identifier1");
130 res.setProperty("type", "dummyresource");
131
132 Sink::Store::create(res).exec().waitForFinished();
133 {
134 Sink::Query query;
135 query.propertyFilter.insert("type", Sink::Query::Comparator("dummyresource"));
136 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::SinkResource>(query);
137 QTRY_COMPARE(model->rowCount(QModelIndex()), 1);
138 }
139
140 Sink::Store::remove(res).exec().waitForFinished();
141 {
142 Sink::Query query;
143 query.propertyFilter.insert("type", Sink::Query::Comparator("dummyresource"));
144 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::SinkResource>(query);
145 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool());
146 QCOMPARE(model->rowCount(QModelIndex()), 0);
147 }
148 }
149
150 void testModelSingle() 122 void testModelSingle()
151 { 123 {
152 auto facade = DummyResourceFacade<Sink::ApplicationDomain::Folder>::registerFacade(); 124 auto facade = DummyResourceFacade<Sink::ApplicationDomain::Folder>::registerFacade();