diff options
author | 6543 <6543@obermui.de> | 2021-07-20 15:16:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 15:16:20 +0200 |
commit | b26c3b482feb57704aa399d8d72a959ce667b879 (patch) | |
tree | 1984bacf320a1d4b8516807d5afe138d8842dd7e /routers | |
parent | 263577842563a8a692212f897bec685751c78f23 (diff) | |
download | gitea-b26c3b482feb57704aa399d8d72a959ce667b879.tar.gz gitea-b26c3b482feb57704aa399d8d72a959ce667b879.zip |
Add TestPrepareWikiFileName (#16487)
* Add TestPrepareWikiFileName
* use LsTree as LsFiles is index only
* ajust other tests
Co-authored-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/wiki_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/wiki_test.go b/routers/web/repo/wiki_test.go index 8934a6619f..bcdb8023ac 100644 --- a/routers/web/repo/wiki_test.go +++ b/routers/web/repo/wiki_test.go @@ -81,7 +81,7 @@ func TestWiki(t *testing.T) { Wiki(ctx) assert.EqualValues(t, http.StatusOK, ctx.Resp.Status()) assert.EqualValues(t, "Home", ctx.Data["Title"]) - assertPagesMetas(t, []string{"Home", "Page With Image", "Page With Spaced Name"}, ctx.Data["Pages"]) + assertPagesMetas(t, []string{"Home", "Page With Image", "Page With Spaced Name", "Unescaped File"}, ctx.Data["Pages"]) } func TestWikiPages(t *testing.T) { @@ -91,7 +91,7 @@ func TestWikiPages(t *testing.T) { test.LoadRepo(t, ctx, 1) WikiPages(ctx) assert.EqualValues(t, http.StatusOK, ctx.Resp.Status()) - assertPagesMetas(t, []string{"Home", "Page With Image", "Page With Spaced Name"}, ctx.Data["Pages"]) + assertPagesMetas(t, []string{"Home", "Page With Image", "Page With Spaced Name", "Unescaped File"}, ctx.Data["Pages"]) } func TestNewWiki(t *testing.T) { |