diff --git a/internal/reader/icon/finder_test.go b/internal/reader/icon/finder_test.go
index 80991a17..d30e69c6 100644
--- a/internal/reader/icon/finder_test.go
+++ b/internal/reader/icon/finder_test.go
@@ -194,16 +194,37 @@ func TestResizeInvalidImage(t *testing.T) {
t.Fatalf("Tried to convert an invalid image")
}
}
+
func TestMinifySvg(t *testing.T) {
data := []byte(``)
want := []byte(``)
+ icon := model.Icon{Content: data, MimeType: "image/svg+xml"}
+ got := resizeIcon(&icon).Content
+ if !bytes.Equal(want, got) {
+ t.Fatalf("Didn't correctly minify the svg: got %s instead of %s", got, want)
+ }
+}
+
+func TestMinifySvgWithError(t *testing.T) {
+ // Invalid SVG with malformed XML that should cause minification to fail
+ data := []byte(`