@@ -0,0 +1,19 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user