mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-10 15:26:38 +08:00
Fix scraping workflows subscriptions bot and recycle bin
This commit is contained in:
@@ -163,6 +163,23 @@ func TestClassifyMediaCategoryMatchesMoviePilotStyleRules(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNormalizeMediaTypeAcceptsChineseLibraryTypes(t *testing.T) {
|
||||
tests := map[string]string{
|
||||
"华语电影": "movie",
|
||||
"欧美剧": "tv",
|
||||
"国产剧": "tv",
|
||||
"日漫": "anime",
|
||||
"国漫": "anime",
|
||||
"综艺": "variety",
|
||||
"成人": "adult",
|
||||
}
|
||||
for input, want := range tests {
|
||||
if got := normalizeMediaType(input, "测试标题", ""); got != want {
|
||||
t.Fatalf("normalizeMediaType(%q) = %q, want %q", input, got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestSubscriptionResolveClassifiedSavePath(t *testing.T) {
|
||||
db, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user