From 5913c1bb14b7fd043b902356c406a4c06f23e005 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 9 Sep 2026 18:32:25 +0000 Subject: [PATCH] :sparkles: Use real image fixtures in link-preview thumbnail tests Store genuine PNG/JPEG bytes via th/tempfile instead of placeholder strings, so the file-thumbnail objects under test carry realistic content and content-types. AI-assisted-by: muse-spark-1.3-contributor --- backend/test/backend_tests/http_link_preview_test.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/test/backend_tests/http_link_preview_test.clj b/backend/test/backend_tests/http_link_preview_test.clj index 0272579bf5..112af4f1a1 100644 --- a/backend/test/backend_tests/http_link_preview_test.clj +++ b/backend/test/backend_tests/http_link_preview_test.clj @@ -33,7 +33,7 @@ (defn- create-file-thumbnail! [file-id] (let [storage (::sto/storage th/*system*) - object (sto/put-object! storage {::sto/content (sto/content "thumbnail data") + object (sto/put-object! storage {::sto/content (sto/content (th/tempfile "backend_tests/test_files/sample.png")) :bucket "file-thumbnail" :content-type "image/png"})] (db/insert! (:app.db/pool th/*system*) :file-thumbnail @@ -138,10 +138,10 @@ :project-id (:default-project-id profile)}) pool (:app.db/pool th/*system*) storage (::sto/storage th/*system*) - old (sto/put-object! storage {::sto/content (sto/content "old thumbnail") + old (sto/put-object! storage {::sto/content (sto/content (th/tempfile "backend_tests/test_files/sample.jpg")) :bucket "file-thumbnail" - :content-type "image/png"}) - latest (sto/put-object! storage {::sto/content (sto/content "latest thumbnail") + :content-type "image/jpeg"}) + latest (sto/put-object! storage {::sto/content (sto/content (th/tempfile "backend_tests/test_files/sample.png")) :bucket "file-thumbnail" :content-type "image/png"})] (db/insert! pool :file-thumbnail