test: add FileStat assertion to validate storage path in attachment test
This commit is contained in:
parent
4cd63f93a4
commit
17eccd848f
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue