From 04c60331b6d790c5cbf837c15b7623842d4a8d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Tejero=20Cantero?= Date: Fri, 14 Aug 2026 01:00:56 +0200 Subject: [PATCH] :paperclip: Assert materialization against the ordinary storage path --- backend/test/backend_tests/rpc_file_branch_test.clj | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/backend/test/backend_tests/rpc_file_branch_test.clj b/backend/test/backend_tests/rpc_file_branch_test.clj index e42a8f3b7d..32f6fd97c2 100644 --- a/backend/test/backend_tests/rpc_file_branch_test.clj +++ b/backend/test/backend_tests/rpc_file_branch_test.clj @@ -968,12 +968,17 @@ (t/is (true? (-> out :result :changed)))) (let [row (th/db-get :file {:id branch-file-id})] - (t/is (false? (:is-branch row))) - (t/is (some? (:data row)))) + (t/is (false? (:is-branch row)))) + + ;; the payload lands where the ordinary write path puts it, which + ;; is a `file_data` row rather than the legacy `file.data` column + (t/is (some? (th/db-get :file-data {:file-id branch-file-id :type "data"}))) (t/is (empty? (th/db-query :file-branch-change {:branch-id branch-id}))) - (let [row (th/db-get :file-branch {:id branch-id})] + ;; the branch row is archived AND logically deleted, so it has to + ;; be read with the deleted-row filter off + (let [row (th/db-get :file-branch {:id branch-id} {:app.db/remove-deleted false})] (t/is (= "archived" (:status row))) (t/is (some? (:deleted-at row)))))