diff options
Diffstat (limited to 'models/wiki_test.go')
-rw-r--r-- | models/wiki_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/models/wiki_test.go b/models/wiki_test.go index f1435e8178..2114425872 100644 --- a/models/wiki_test.go +++ b/models/wiki_test.go @@ -9,13 +9,14 @@ import ( "testing" "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/unittest" "code.gitea.io/gitea/modules/setting" "github.com/stretchr/testify/assert" ) func TestRepository_WikiCloneLink(t *testing.T) { - assert.NoError(t, db.PrepareTestDatabase()) + assert.NoError(t, unittest.PrepareTestDatabase()) repo := db.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository) cloneLink := repo.WikiCloneLink() @@ -24,20 +25,20 @@ func TestRepository_WikiCloneLink(t *testing.T) { } func TestWikiPath(t *testing.T) { - assert.NoError(t, db.PrepareTestDatabase()) + assert.NoError(t, unittest.PrepareTestDatabase()) expected := filepath.Join(setting.RepoRootPath, "user2/repo1.wiki.git") assert.Equal(t, expected, WikiPath("user2", "repo1")) } func TestRepository_WikiPath(t *testing.T) { - assert.NoError(t, db.PrepareTestDatabase()) + assert.NoError(t, unittest.PrepareTestDatabase()) repo := db.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) { - db.PrepareTestEnv(t) + unittest.PrepareTestEnv(t) repo1 := db.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository) assert.True(t, repo1.HasWiki()) repo2 := db.AssertExistsAndLoadBean(t, &Repository{ID: 2}).(*Repository) |