mirror of
https://github.com/1f349/violet.git
synced 2024-11-21 19:01:39 +00:00
Clean unused code in favicon tests
This commit is contained in:
parent
a432ba8027
commit
c64d89eb5c
@ -1,7 +1,6 @@
|
||||
package favicons
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
@ -14,13 +13,6 @@ func TestFaviconList_PreProcess(t *testing.T) {
|
||||
assert.NoError(t, icons.PreProcess(func(in []byte) ([]byte, error) {
|
||||
return svg2png("inkscape", in)
|
||||
}))
|
||||
iconSvg, err := icons.ProduceSvg()
|
||||
assert.NoError(t, err)
|
||||
iconPng, err := icons.ProducePng()
|
||||
assert.NoError(t, err)
|
||||
iconIco, err := icons.ProduceIco()
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.Equal(t, "https://example.com/assets/logo.svg", icons.Svg.Url)
|
||||
|
||||
assert.Equal(t, "74cdc17d0502a690941799c327d9ca1ed042e76c784def43a42937f2eed270b4", icons.Svg.Hash)
|
||||
|
@ -1,7 +1,6 @@
|
||||
package favicons
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"database/sql"
|
||||
_ "embed"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
@ -32,13 +31,6 @@ func TestFaviconsNew(t *testing.T) {
|
||||
favicons.cLock.Unlock()
|
||||
|
||||
icons := favicons.GetIcons("example.com")
|
||||
iconSvg, err := icons.ProduceSvg()
|
||||
assert.NoError(t, err)
|
||||
iconPng, err := icons.ProducePng()
|
||||
assert.NoError(t, err)
|
||||
iconIco, err := icons.ProduceIco()
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.Equal(t, "https://example.com/assets/logo.svg", icons.Svg.Url)
|
||||
|
||||
assert.Equal(t, "74cdc17d0502a690941799c327d9ca1ed042e76c784def43a42937f2eed270b4", icons.Svg.Hash)
|
||||
|
Loading…
Reference in New Issue
Block a user