diff options
Diffstat (limited to 'tests/teststore.cpp')
-rw-r--r-- | tests/teststore.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/teststore.cpp b/tests/teststore.cpp index 294aca8f..4716fa2e 100644 --- a/tests/teststore.cpp +++ b/tests/teststore.cpp | |||
@@ -168,6 +168,17 @@ QVariant TestStore::load(const QByteArray &type, const QVariantMap &filter) | |||
168 | } | 168 | } |
169 | return {}; | 169 | return {}; |
170 | } | 170 | } |
171 | if (type == "folder") { | ||
172 | Sink::Query query; | ||
173 | if (filter.contains("resource")) { | ||
174 | query.resourceFilter(filter.value("resource").toByteArray()); | ||
175 | } | ||
176 | auto list = Sink::Store::read<Folder>(query); | ||
177 | if (!list.isEmpty()) { | ||
178 | return QVariant::fromValue(Folder::Ptr::create(list.first())); | ||
179 | } | ||
180 | return {}; | ||
181 | } | ||
171 | 182 | ||
172 | Q_ASSERT(false); | 183 | Q_ASSERT(false); |
173 | return {}; | 184 | return {}; |