testLaunchOnStartup shouldn't fail on dev setup
authorKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 27 May 2020 13:11:25 +0000 (15:11 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 27 May 2020 13:11:25 +0000 (15:11 +0200)
This test was failing locally for me. Indeed, through QStandardPaths it
was finding the user settings of my production client and not having the
initial state it expected. Using QStandardPaths test mode then it starts
from a clean slate every time.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
test/testutility.cpp

index 66473dfa3232b1ca9713b596b90e79f9a647bcbe..2e2b03addaf08e4e0a801dd05a9dece7df920940 100644 (file)
@@ -20,6 +20,11 @@ class TestUtility : public QObject
     Q_OBJECT
 
 private slots:
+    void initTestCase()
+    {
+        QStandardPaths::setTestModeEnabled(true);
+    }
+
     void testFormatFingerprint()
     {
         QVERIFY2(formatFingerprint("68ac906495480a3404beee4874ed853a037a7a8f")