summaryrefslogtreecommitdiffstats
path: root/integrations/repofiles_delete_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'integrations/repofiles_delete_test.go')
-rw-r--r--integrations/repofiles_delete_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/integrations/repofiles_delete_test.go b/integrations/repofiles_delete_test.go
index 22fef4b03e..8150673e2b 100644
--- a/integrations/repofiles_delete_test.go
+++ b/integrations/repofiles_delete_test.go
@@ -8,8 +8,9 @@ import (
"net/url"
"testing"
+ "code.gitea.io/gitea/models/unittest"
+
"code.gitea.io/gitea/models"
- "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/repofiles"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/test"
@@ -67,7 +68,7 @@ func TestDeleteRepoFile(t *testing.T) {
func testDeleteRepoFile(t *testing.T, u *url.URL) {
// setup
- db.PrepareTestEnv(t)
+ unittest.PrepareTestEnv(t)
ctx := test.MockContext(t, "user2/repo1")
ctx.SetParams(":id", "1")
test.LoadRepo(t, ctx, 1)
@@ -106,7 +107,7 @@ func TestDeleteRepoFileWithoutBranchNames(t *testing.T) {
func testDeleteRepoFileWithoutBranchNames(t *testing.T, u *url.URL) {
// setup
- db.PrepareTestEnv(t)
+ unittest.PrepareTestEnv(t)
ctx := test.MockContext(t, "user2/repo1")
ctx.SetParams(":id", "1")
test.LoadRepo(t, ctx, 1)
@@ -136,7 +137,7 @@ func testDeleteRepoFileWithoutBranchNames(t *testing.T, u *url.URL) {
func TestDeleteRepoFileErrors(t *testing.T) {
// setup
- db.PrepareTestEnv(t)
+ unittest.PrepareTestEnv(t)
ctx := test.MockContext(t, "user2/repo1")
ctx.SetParams(":id", "1")
test.LoadRepo(t, ctx, 1)