From 000735188c7f2c83f16d22e1c648c93b3de0f11a Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Mon, 3 Feb 2020 15:50:25 +0100 Subject: [PATCH] Test: Add test for api/photo_thumbnail --- internal/api/photo_thumbnail_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/api/photo_thumbnail_test.go b/internal/api/photo_thumbnail_test.go index 5c6688008..142cefe46 100644 --- a/internal/api/photo_thumbnail_test.go +++ b/internal/api/photo_thumbnail_test.go @@ -20,6 +20,13 @@ func TestGetThumbnail(t *testing.T) { GetThumbnail(router, ctx) result := PerformRequest(app, "GET", "/api/v1/thumbnails/1/tile_500") + assert.Equal(t, http.StatusNotFound, result.Code) + }) + t.Run("could not find original", func(t *testing.T) { + app, router, ctx := NewApiTest() + GetThumbnail(router, ctx) + result := PerformRequest(app, "GET", "/api/v1/thumbnails/123xxx/tile_500") + assert.Equal(t, http.StatusNotFound, result.Code) }) }