From 9710396ae7d8ecffee2880166d97c18f4ddf0b27 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 10 Oct 2019 21:56:43 +0200 Subject: [PATCH] Added todo for tests --- pkg/models/task_attachment_test.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pkg/models/task_attachment_test.go b/pkg/models/task_attachment_test.go index 8a7f3fd80..16d6176e7 100644 --- a/pkg/models/task_attachment_test.go +++ b/pkg/models/task_attachment_test.go @@ -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) { + + }) +}