test: add FileStat assertion to validate storage path in attachment test

This commit is contained in:
kolaente 2026-03-19 17:18:01 +01:00
parent 4cd63f93a4
commit 17eccd848f
1 changed files with 6 additions and 0 deletions

View File

@ -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)