Files
seanime-docker/seanime-2.9.10/internal/api/anizip/anizip_test.go
2025-09-20 14:08:38 +01:00

38 lines
640 B
Go

package anizip
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestFetchAniZipMedia(t *testing.T) {
tests := []struct {
name string
provider string
id int
expectedTitle string
}{
{
name: "Cowboy Bebop",
provider: "anilist",
id: 1,
expectedTitle: "Cowboy Bebop",
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
media, err := FetchAniZipMedia(test.provider, test.id)
if assert.NoError(t, err) {
if assert.NotNil(t, media) {
assert.Equal(t, media.GetTitle(), test.expectedTitle)
}
}
})
}
}