aboutsummaryrefslogtreecommitdiffstats
path: root/services/wiki/wiki_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/wiki/wiki_test.go')
-rw-r--r--services/wiki/wiki_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/services/wiki/wiki_test.go b/services/wiki/wiki_test.go
index 1852ddbcb3..938a7d6acd 100644
--- a/services/wiki/wiki_test.go
+++ b/services/wiki/wiki_test.go
@@ -9,7 +9,6 @@ import (
"path/filepath"
"testing"
- "code.gitea.io/gitea/models"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
@@ -90,11 +89,11 @@ func TestWikiFilenameToName(t *testing.T) {
} {
_, err := FilenameToName(badFilename)
assert.Error(t, err)
- assert.True(t, models.IsErrWikiInvalidFileName(err))
+ assert.True(t, repo_model.IsErrWikiInvalidFileName(err))
}
_, err := FilenameToName("badescaping%%.md")
assert.Error(t, err)
- assert.False(t, models.IsErrWikiInvalidFileName(err))
+ assert.False(t, repo_model.IsErrWikiInvalidFileName(err))
}
func TestWikiNameToFilenameToName(t *testing.T) {
@@ -157,7 +156,7 @@ func TestRepository_AddWikiPage(t *testing.T) {
// test for already-existing wiki name
err := AddWikiPage(git.DefaultContext, doer, repo, "Home", wikiContent, commitMsg)
assert.Error(t, err)
- assert.True(t, models.IsErrWikiAlreadyExist(err))
+ assert.True(t, repo_model.IsErrWikiAlreadyExist(err))
})
t.Run("check wiki reserved name", func(t *testing.T) {
@@ -165,7 +164,7 @@ func TestRepository_AddWikiPage(t *testing.T) {
// test for reserved wiki name
err := AddWikiPage(git.DefaultContext, doer, repo, "_edit", wikiContent, commitMsg)
assert.Error(t, err)
- assert.True(t, models.IsErrWikiReservedName(err))
+ assert.True(t, repo_model.IsErrWikiReservedName(err))
})
}