Task Attachments #104

Merged
konrad merged 63 commits from feature/attachments into master 2019-10-16 20:52:31 +00:00
1 changed files with 23 additions and 0 deletions
Showing only changes of commit 9710396ae7 - Show all commits

View File

@ -60,3 +60,26 @@ func TestTaskAttachment_ReadOne(t *testing.T) {
assert.EqualError(t, err, "file 9999 does not exist")
})
}
func TestTaskAttachment_NewAttachment(t *testing.T) {
// Assert the file is being stored correctly
// Maybe needs adoption to pass an os.File or whatever comes from multipart.File.Open instead
// of passing multipart.File directly
// Also assert created_by_id is correct in the files table
// Extra test for max size test
}
func TestTaskAttachment_ReadAll(t *testing.T) {
// Assert all files are loaded correctly with their actual files
}
func TestTaskAttachment_Delete(t *testing.T) {
t.Run("Normal", func(t *testing.T) {
// TODO: also check the actual file is being deleted
})
t.Run("Nonexisting", func(t *testing.T) {
})
}