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)