From 17eccd848fd8688cd18f5dd46d1beb2c6ce96442 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 19 Mar 2026 17:18:01 +0100 Subject: [PATCH] test: add FileStat assertion to validate storage path in attachment test --- pkg/models/task_attachment_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/models/task_attachment_test.go b/pkg/models/task_attachment_test.go index fef69902b..5049825e3 100644 --- a/pkg/models/task_attachment_test.go +++ b/pkg/models/task_attachment_test.go @@ -49,6 +49,12 @@ func TestTaskAttachment_ReadOne(t *testing.T) { // Load the actual attachment file and check its content err = ta.File.LoadFileByID() require.NoError(t, err) + + // Validate the file exists at the expected storage path + stat, err := files.FileStat(ta.File) + require.NoError(t, err) + assert.NotNil(t, stat) + content := make([]byte, 9) read, err := ta.File.File.Read(content) require.NoError(t, err)