Fix file tests on postgres

Signed-off-by: kolaente <k@knt.li>
This commit is contained in:
kolaente 2020-02-16 13:03:36 +01:00
parent b244b4343f
commit c7966e10d1
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 2 deletions

View File

@ -57,11 +57,11 @@ func TestCreate(t *testing.T) {
content: []byte("testfile"),
}
ta := &testauth{id: 1}
_, err := Create(tf, "testfile", 100, ta)
createdFile, err := Create(tf, "testfile", 100, ta)
assert.NoError(t, err)
// Check the file was created correctly
file := &File{ID: 2}
file := &File{ID: createdFile.ID}
err = file.LoadFileMetaByID()
assert.NoError(t, err)
assert.Equal(t, int64(1), file.CreatedByID)