summaryrefslogtreecommitdiffstats
path: root/models/wiki_test.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2018-02-05 16:56:30 +0200
committerGitHub <noreply@github.com>2018-02-05 16:56:30 +0200
commit283e87d8145ac5dd61f86f61e347ffa684ac5684 (patch)
tree258a5d90d5e8117a9ffe412505a82212c4a38eb1 /models/wiki_test.go
parentb16c84de7b402c03ffda2dc9dd1ebc4f89928d0f (diff)
downloadgitea-283e87d8145ac5dd61f86f61e347ffa684ac5684.tar.gz
gitea-283e87d8145ac5dd61f86f61e347ffa684ac5684.zip
Fix rendering of wiki page list if wiki repo contains other files (#3454)
* Fix rendering of wiki page list if wiki repo contains other files * Improve wiki filename tests
Diffstat (limited to 'models/wiki_test.go')
-rw-r--r--models/wiki_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/wiki_test.go b/models/wiki_test.go
index 80f6df55ec..a142a58f35 100644
--- a/models/wiki_test.go
+++ b/models/wiki_test.go
@@ -77,11 +77,14 @@ func TestWikiFilenameToName(t *testing.T) {
for _, badFilename := range []string{
"nofileextension",
"wrongfileextension.txt",
- "badescaping%%.md",
} {
_, err := WikiFilenameToName(badFilename)
assert.Error(t, err)
+ assert.True(t, IsErrWikiInvalidFileName(err))
}
+ _, err := WikiFilenameToName("badescaping%%.md")
+ assert.Error(t, err)
+ assert.False(t, IsErrWikiInvalidFileName(err))
}
func TestWikiNameToFilenameToName(t *testing.T) {