diff options
author | Christian Kamm <mail@ckamm.de> | 2018-02-20 12:36:07 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2018-02-20 12:36:07 +0300 |
commit | ed2dfcf3993c4bb92270adbdc2746ffda162abf3 (patch) | |
tree | 99994f4e71ae0d183660be5b285ec16394268400 /test | |
parent | 6fc3bfc265aba0ab91bfff1108bb6c7f12d6264b (diff) |
Conflicts with user name: Fix tests
Diffstat (limited to 'test')
-rw-r--r-- | test/syncenginetestutils.h | 1 | ||||
-rw-r--r-- | test/testsyncconflict.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h index f7cf4eb46..06c35d300 100644 --- a/test/syncenginetestutils.h +++ b/test/syncenginetestutils.h @@ -880,6 +880,7 @@ public: _account = OCC::Account::create(); _account->setUrl(QUrl(QStringLiteral("http://admin:admin@localhost/owncloud"))); _account->setCredentials(new FakeCredentials{_fakeQnam}); + _account->setDavDisplayName("fakename"); _journalDb.reset(new OCC::SyncJournalDb(localPath() + "._sync_test.db")); _syncEngine.reset(new OCC::SyncEngine(_account, localPath(), "", _journalDb.get())); diff --git a/test/testsyncconflict.cpp b/test/testsyncconflict.cpp index 645bc466d..4bc297a36 100644 --- a/test/testsyncconflict.cpp +++ b/test/testsyncconflict.cpp @@ -83,7 +83,7 @@ private slots: // Verify that the conflict names don't have the user name for (const auto &name : findConflicts(fakeFolder.currentLocalState().children["A"])) { - QVERIFY(!name.contains(fakeFolder.syncEngine().account()->davUser())); + QVERIFY(!name.contains(fakeFolder.syncEngine().account()->davDisplayName())); } QVERIFY(expectAndWipeConflict(fakeFolder.localModifier(), fakeFolder.currentLocalState(), "A/a1")); @@ -128,7 +128,7 @@ private slots: QCOMPARE(Utility::conflictFileBaseName(conflictMap[a1FileId].toUtf8()), QByteArray("A/a1")); // Check that the conflict file contains the username - QVERIFY(conflictMap[a1FileId].contains(QString("-%1-").arg(fakeFolder.syncEngine().account()->davUser()))); + QVERIFY(conflictMap[a1FileId].contains(QString("-%1-").arg(fakeFolder.syncEngine().account()->davDisplayName()))); QCOMPARE(remote.find(conflictMap[a1FileId])->contentChar, 'L'); QCOMPARE(remote.find("A/a1")->contentChar, 'R'); |