Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/testsyncjournaldb.cpp')
-rw-r--r--test/testsyncjournaldb.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/testsyncjournaldb.cpp b/test/testsyncjournaldb.cpp
index 389dcec5d..389330ffa 100644
--- a/test/testsyncjournaldb.cpp
+++ b/test/testsyncjournaldb.cpp
@@ -183,6 +183,28 @@ private slots:
QCOMPARE(record.numericFileId(), QByteArray("123456789"));
}
+ void testConflictRecord()
+ {
+ ConflictRecord record;
+ record.path = "abc";
+ record.baseFileId = "def";
+ record.baseModtime = 1234;
+ record.baseEtag = "ghi";
+
+ QVERIFY(!_db.conflictRecord(record.path).isValid());
+
+ _db.setConflictRecord(record);
+ auto newRecord = _db.conflictRecord(record.path);
+ QVERIFY(newRecord.isValid());
+ QCOMPARE(newRecord.path, record.path);
+ QCOMPARE(newRecord.baseFileId, record.baseFileId);
+ QCOMPARE(newRecord.baseModtime, record.baseModtime);
+ QCOMPARE(newRecord.baseEtag, record.baseEtag);
+
+ _db.deleteConflictRecord(record.path);
+ QVERIFY(!_db.conflictRecord(record.path).isValid());
+ }
+
private:
SyncJournalDb _db;
};