2019-06-03 09:32:43 +00:00
|
|
|
package arn_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2024-03-12 11:56:30 +00:00
|
|
|
"git.akyoto.dev/go/assert"
|
2019-06-03 09:32:43 +00:00
|
|
|
"github.com/animenotifier/notify.moe/arn"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAnimeSort(t *testing.T) {
|
|
|
|
anime2011 := arn.FilterAnime(func(anime *arn.Anime) bool {
|
|
|
|
return anime.StartDateTime().Year() == 2011
|
|
|
|
})
|
|
|
|
|
|
|
|
arn.SortAnimeByQuality(anime2011)
|
|
|
|
|
|
|
|
// Best anime of 2011 needs to be Steins;Gate
|
|
|
|
assert.Equal(t, "0KUWpFmig", anime2011[0].ID)
|
|
|
|
}
|