瀏覽代碼

testLaunchOnStartup shouldn't fail on dev setup

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>
Kevin Ottens 5 年之前
父節點
當前提交
b39a14bf2b
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      test/testutility.cpp

+ 5 - 0
test/testutility.cpp

@@ -20,6 +20,11 @@ class TestUtility : public QObject
     Q_OBJECT
 
 private slots:
+    void initTestCase()
+    {
+        QStandardPaths::setTestModeEnabled(true);
+    }
+
     void testFormatFingerprint()
     {
         QVERIFY2(formatFingerprint("68ac906495480a3404beee4874ed853a037a7a8f")