summaryrefslogtreecommitdiffstats
path: root/tests/storagetest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-10-06 16:19:51 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-10-10 10:40:01 +0200
commitf689ad1021a7805f6f8b6a81f534b4cb9ca91f51 (patch)
treec18d746b775279f143c8d8052924bb4d83fbb91f /tests/storagetest.cpp
parentc3f6e72c2d46906a4699127b558ca248729ce577 (diff)
downloadsink-f689ad1021a7805f6f8b6a81f534b4cb9ca91f51.tar.gz
sink-f689ad1021a7805f6f8b6a81f534b4cb9ca91f51.zip
Change replay
So far only includes modifications and additions, removals are not yet stored as separate revisions.
Diffstat (limited to 'tests/storagetest.cpp')
-rw-r--r--tests/storagetest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp
index 8d5ee00..8e841cb 100644
--- a/tests/storagetest.cpp
+++ b/tests/storagetest.cpp
@@ -381,6 +381,15 @@ private Q_SLOTS:
381 381
382 QCOMPARE(result, QByteArray("value2")); 382 QCOMPARE(result, QByteArray("value2"));
383 } 383 }
384
385 void testRecordRevision()
386 {
387 Akonadi2::Storage store(testDataPath, dbName, Akonadi2::Storage::ReadWrite);
388 auto transaction = store.createTransaction(Akonadi2::Storage::ReadWrite);
389 Akonadi2::Storage::recordRevision(transaction, 1, "uid", "type");
390 QCOMPARE(Akonadi2::Storage::getTypeFromRevision(transaction, 1), QByteArray("type"));
391 QCOMPARE(Akonadi2::Storage::getUidFromRevision(transaction, 1), QByteArray("uid"));
392 }
384}; 393};
385 394
386QTEST_MAIN(StorageTest) 395QTEST_MAIN(StorageTest)