From a785a9d7088e0c46ac241abdf28c743c859dda1a Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Tue, 19 May 2020 12:51:19 +0200 Subject: [PATCH] Backend: Update TestPhoto_Save test Signed-off-by: Michael Mayer --- internal/entity/photo_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/entity/photo_test.go b/internal/entity/photo_test.go index bbc7d5521..8bbb32c08 100644 --- a/internal/entity/photo_test.go +++ b/internal/entity/photo_test.go @@ -70,8 +70,6 @@ func TestSavePhotoForm(t *testing.T) { } func TestPhoto_Save(t *testing.T) { - /* Creating new photos with Save() not supported (yet) - t.Run("new photo", func(t *testing.T) { photo := Photo{ ID: 11111, @@ -103,11 +101,9 @@ func TestPhoto_Save(t *testing.T) { } err := photo.Save() - if err != nil { - t.Fatal(err) - } + + assert.EqualError(t, err, "photo: can't save to database, id is empty") }) - */ t.Run("existing photo", func(t *testing.T) { m := PhotoFixtures.Get("19800101_000002_D640C559")