Browse Source

UnitTests: Set a CookiesJar in FakeQNAM

Hannah von Reth 5 years ago
parent
commit
a0d81df21e
1 changed files with 6 additions and 1 deletions
  1. 6 1
      test/syncenginetestutils.h

+ 6 - 1
test/syncenginetestutils.h

@@ -22,6 +22,7 @@
 #include <QtTest>
 #include <memory>
 
+#include <cookiejar.h>
 
 /*
  * TODO: In theory we should use QVERIFY instead of Q_ASSERT for testing, but this
@@ -889,7 +890,11 @@ private:
     Override _override;
 
 public:
-    FakeQNAM(FileInfo initialRoot) : _remoteRootFileInfo{std::move(initialRoot)} { }
+    FakeQNAM(FileInfo initialRoot)
+        : _remoteRootFileInfo{std::move(initialRoot)}
+    {
+        setCookieJar(new OCC::CookieJar);
+    }
     FileInfo &currentRemoteState() { return _remoteRootFileInfo; }
     FileInfo &uploadState() { return _uploadFileInfo; }