Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
20 lines
560 B
Go
20 lines
560 B
Go
package configser
|
|
|
|
import "testing"
|
|
|
|
func TestRichTextHrefUsesRichtextRoutes(t *testing.T) {
|
|
tests := map[string]string{
|
|
"关于我们": "/richtext/关于我们/",
|
|
"用户协议": "/richtext/用户协议/",
|
|
"隐私政策": "/richtext/隐私政策/",
|
|
"帮助中心": "/richtext/帮助中心/",
|
|
"问题反馈": "/richtext/问题反馈/",
|
|
"自定义内容": "/richtext/自定义内容/",
|
|
}
|
|
for title, want := range tests {
|
|
if got := RichTextHref(title); got != want {
|
|
t.Fatalf("RichTextHref(%q) = %q, want %q", title, got, want)
|
|
}
|
|
}
|
|
}
|