aboutsummaryrefslogtreecommitdiffstats
path: root/models/wiki_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/wiki_test.go')
-rw-r--r--models/wiki_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/models/wiki_test.go b/models/wiki_test.go
index 2114425872..ae6b090db5 100644
--- a/models/wiki_test.go
+++ b/models/wiki_test.go
@@ -8,7 +8,6 @@ import (
"path/filepath"
"testing"
- "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unittest"
"code.gitea.io/gitea/modules/setting"
@@ -18,7 +17,7 @@ import (
func TestRepository_WikiCloneLink(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
- repo := db.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
+ repo := unittest.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
cloneLink := repo.WikiCloneLink()
assert.Equal(t, "ssh://runuser@try.gitea.io:3000/user2/repo1.wiki.git", cloneLink.SSH)
assert.Equal(t, "https://try.gitea.io/user2/repo1.wiki.git", cloneLink.HTTPS)
@@ -32,15 +31,15 @@ func TestWikiPath(t *testing.T) {
func TestRepository_WikiPath(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
- repo := db.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
+ repo := unittest.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
expected := filepath.Join(setting.RepoRootPath, "user2/repo1.wiki.git")
assert.Equal(t, expected, repo.WikiPath())
}
func TestRepository_HasWiki(t *testing.T) {
unittest.PrepareTestEnv(t)
- repo1 := db.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
+ repo1 := unittest.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
assert.True(t, repo1.HasWiki())
- repo2 := db.AssertExistsAndLoadBean(t, &Repository{ID: 2}).(*Repository)
+ repo2 := unittest.AssertExistsAndLoadBean(t, &Repository{ID: 2}).(*Repository)
assert.False(t, repo2.HasWiki())
}