删除福利应用

This commit is contained in:
谢宇宁
2026-10-28 16:20:38 +07:00
parent 1a4718176d
commit 4e98b85fd8
18 changed files with 17 additions and 1090 deletions
+10 -1
View File
@@ -13,7 +13,6 @@ func TestResolveNavigationActiveKey(t *testing.T) {
"/topic/editor-picks/page/2": "topic",
"/rank/2/page/3": "rank",
"/category/latest-video/": "category",
"/application": "application",
"/home-road": "homeRoad",
"/detail/example-playlet": "list",
"/play/example-playlet/chapter-1": "list",
@@ -81,3 +80,13 @@ func TestNormalizeNavURLKeepsConfiguredURL(t *testing.T) {
t.Fatalf("normalizeNavURL configured download URL = (%q, %v, %v)", href, external, download)
}
}
func TestBuildHeaderNavSkipsApplication(t *testing.T) {
items := BuildHeaderNav(&AppTranslationInfo{CategoryList: []TranslationCategory{
{Name: "排行榜", URLValue: "/rank/", CategoryType: 1},
{Name: "福利应用", URLValue: "/application/", CategoryType: 1},
}})
if len(items) != 1 || items[0].Href != "/rank/" {
t.Fatalf("BuildHeaderNav = %+v, want only /rank/", items)
}
}