aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/wiki/wiki_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/wiki/wiki_test.go b/services/wiki/wiki_test.go
index a781ebeda4..ccb230e06f 100644
--- a/services/wiki/wiki_test.go
+++ b/services/wiki/wiki_test.go
@@ -34,6 +34,9 @@ func TestUserTitleToWebPath(t *testing.T) {
UserTitle string
}
for _, test := range []test{
+ {"unnamed", ""},
+ {"unnamed", "."},
+ {"unnamed", ".."},
{"wiki-name", "wiki name"},
{"title.md.-", "title.md"},
{"wiki-name.-", "wiki-name"},
@@ -118,7 +121,7 @@ func TestUserWebGitPathConsistency(t *testing.T) {
}
userTitle := strings.TrimSpace(string(b[:l]))
- if userTitle == "" || userTitle == "." {
+ if userTitle == "" || userTitle == "." || userTitle == ".." {
continue
}
webPath := UserTitleToWebPath("", userTitle)