Skip to content

Commit

Permalink
write test for GifToBytesReader
Browse files Browse the repository at this point in the history
  • Loading branch information
logica0419 committed Dec 10, 2023
1 parent 113444a commit 9e684a5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions utils/imaging/gif_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package imaging

import (
"image/gif"
"testing"

"github.com/stretchr/testify/assert"
"github.com/traPtitech/traQ/testutils"
)

func TestGifToBytesReader(t *testing.T) {
t.Parallel()

tests := []string{"cube.gif", "miku.gif", "parapara.gif", "miku2.gif", "rabbit.gif"}

for _, tt := range tests {
t.Run(tt, func(t *testing.T) {
f, err := gif.DecodeAll(testutils.MustOpenGif(tt))
assert.Nil(t, err)

_, err = GifToBytesReader(f)
assert.Nil(t, err)
})
}
}

0 comments on commit 9e684a5

Please sign in to comment.