Test: Add test for api/photo_thumbnail

This commit is contained in:
Theresa Gresch 2020-02-03 15:50:25 +01:00
parent 8ddc758504
commit 000735188c

View file

@ -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)
})
}