mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-12 08:16:37 +08:00
优化
优化
This commit is contained in:
@@ -36,13 +36,13 @@ func TestParseAdultDetailHTML(t *testing.T) {
|
||||
<div>日期 2024-05-01</div>
|
||||
</html>`
|
||||
|
||||
got := parseAdultDetailHTML(html, "SSIS-001", "javdb", "https://javdb.com/v/abc")
|
||||
if got == nil {
|
||||
t.Fatal("parseAdultDetailHTML returned nil")
|
||||
}
|
||||
if got.Title != "测试标题" || got.OriginalName != "SSIS-001" || !got.NSFW {
|
||||
t.Fatalf("unexpected metadata: %+v", got)
|
||||
}
|
||||
got := parseAdultDetailHTML(html, "SSIS-001", "javdb", "https://javdb.com/v/abc")
|
||||
if got == nil {
|
||||
t.Fatal("parseAdultDetailHTML returned nil")
|
||||
}
|
||||
if got.Title != "SSIS-001-测试标题" || got.OriginalName != "SSIS-001" || !got.NSFW {
|
||||
t.Fatalf("unexpected metadata: %+v", got)
|
||||
}
|
||||
if got.PosterURL != "https://javdb.com/covers/ssis001.jpg" || got.BackdropURL != "https://javdb.com/samples/1.jpg" {
|
||||
t.Fatalf("unexpected artwork: %+v", got)
|
||||
}
|
||||
@@ -98,9 +98,9 @@ func TestAdultProviderUsesConfiguredMultipleSources(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if match == nil || match.Title != "多源命中标题" || match.OriginalName != "SSIS-001" || !match.NSFW {
|
||||
t.Fatalf("multi-source adult match = %+v", match)
|
||||
}
|
||||
if match == nil || match.Title != "SSIS-001-多源命中标题" || match.OriginalName != "SSIS-001" || !match.NSFW {
|
||||
t.Fatalf("multi-source adult match = %+v", match)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAdultSourceKindRecognizesJavBusMirrors(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user