diff --git a/app/rest/proxy/image_test.go b/app/rest/proxy/image_test.go
index 28f444be..b0b63cde 100644
--- a/app/rest/proxy/image_test.go
+++ b/app/rest/proxy/image_test.go
@@ -80,12 +80,20 @@ func TestImage_Routes(t *testing.T) {
resp, err = http.Get(ts.URL + "/?src=" + encodedImgURL)
require.Nil(t, err)
assert.Equal(t, 404, resp.StatusCode)
+
+ encodedImgURL = base64.URLEncoding.EncodeToString([]byte(httpSrv.URL + "bad encoding"))
+ resp, err = http.Get(ts.URL + "/?src=" + encodedImgURL)
+ require.Nil(t, err)
+ assert.Equal(t, 400, resp.StatusCode)
}
func TestPicture_Convert(t *testing.T) {
img := Image{Enabled: true, RoutePath: "/img"}
r := img.Convert(`
xyz
`)
assert.Equal(t, `
xyz
`, r)
+
+ r = img.Convert(`
xyz
`)
+ assert.Equal(t, `
xyz
`, r)
}
func imgHTTPServer(t *testing.T) *httptest.Server {