[office/tellico/4.2] src/tests: Update document test now that gradient images no longer written to disk

Robby Stephenson <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit acfce6933a39c4bb34574765428aef38a565b90d by Robby Stephenson.
Committed on 17/08/2026 at 00:09.
Pushed by rstephenson into branch '4.2'.

Update document test now that gradient images no longer written to disk

M  +7    -2    src/tests/documenttest.cpp

https://invent.kde.org/office/tellico/-/commit/acfce6933a39c4bb34574765428aef38a565b90d

diff --git a/src/tests/documenttest.cpp b/src/tests/documenttest.cpp
index 383c8069a..65e1e2e0c 100644
--- a/src/tests/documenttest.cpp
+++ b/src/tests/documenttest.cpp
@@ -283,8 +283,8 @@ void DocumentTest::testView() {
   QCOMPARE(e->field(QStringLiteral("cover")), imageName);
 
   view.showEntry(e);
-  // now it exists, because of writing the style images
-  QVERIFY(imageDir.exists());
+  // image folder still does not exist yet
+  QCOMPARE(imageDir.exists(), false);
   // the image was not written to image dir but to a different temp dir
   QCOMPARE(imageDir.exists(imageName), false);
 
@@ -326,4 +326,9 @@ void DocumentTest::testView() {
   view.showEntry(list.front());
   // the new image still should not exist in the data dir
   QCOMPARE(imageDir.exists(newImageId), false);
+
+  // save the document so the images get written
+  QVERIFY(doc->saveDocument(QUrl::fromLocalFile(fileName)));
+  QVERIFY(imageDir.exists(imageName));
+  QVERIFY(imageDir.exists(newImageId));
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.