diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/storagetest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp index b71a767..55ec888 100644 --- a/tests/storagetest.cpp +++ b/tests/storagetest.cpp | |||
@@ -142,6 +142,18 @@ private Q_SLOTS: | |||
142 | }); | 142 | }); |
143 | } | 143 | } |
144 | 144 | ||
145 | void testNestedTransactions() | ||
146 | { | ||
147 | populate(3); | ||
148 | Akonadi2::Storage store(testDataPath, dbName, Akonadi2::Storage::ReadWrite); | ||
149 | store.createTransaction(Akonadi2::Storage::ReadOnly).scan("key1", [&](const QByteArray &key, const QByteArray &value) -> bool { | ||
150 | store.createTransaction(Akonadi2::Storage::ReadWrite).remove(key, [](const Akonadi2::Storage::Error &) { | ||
151 | QVERIFY(false); | ||
152 | }); | ||
153 | return false; | ||
154 | }); | ||
155 | } | ||
156 | |||
145 | void testReadEmptyDb() | 157 | void testReadEmptyDb() |
146 | { | 158 | { |
147 | bool gotResult = false; | 159 | bool gotResult = false; |