summaryrefslogtreecommitdiffstats
path: root/routers/web/org
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-09-01 19:26:07 +0800
committerGitHub <noreply@github.com>2023-09-01 11:26:07 +0000
commite8aae43f56fedd6f7b04affd378c2c4ed2af9d78 (patch)
treea9b03cbf3f926f2cd27eb4d3c18126aec1cc7aa9 /routers/web/org
parentfcb4941d47217f3a369148d98b07e27205f385b8 (diff)
downloadgitea-e8aae43f56fedd6f7b04affd378c2c4ed2af9d78.tar.gz
gitea-e8aae43f56fedd6f7b04affd378c2c4ed2af9d78.zip
Move web/api context related testing function into a separate package (#26859)
Just like `models/unittest`, the testing helper functions should be in a separate package: `contexttest` And complete the TODO: > // TODO: move this function to other packages, because it depends on "models" package
Diffstat (limited to 'routers/web/org')
-rw-r--r--routers/web/org/projects_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/org/projects_test.go b/routers/web/org/projects_test.go
index 08a97b7d2d..8053ab4cf9 100644
--- a/routers/web/org/projects_test.go
+++ b/routers/web/org/projects_test.go
@@ -7,7 +7,7 @@ import (
"testing"
"code.gitea.io/gitea/models/unittest"
- "code.gitea.io/gitea/modules/test"
+ "code.gitea.io/gitea/modules/contexttest"
"code.gitea.io/gitea/routers/web/org"
"github.com/stretchr/testify/assert"
@@ -15,8 +15,8 @@ import (
func TestCheckProjectBoardChangePermissions(t *testing.T) {
unittest.PrepareTestEnv(t)
- ctx, _ := test.MockContext(t, "user2/-/projects/4/4")
- test.LoadUser(t, ctx, 2)
+ ctx, _ := contexttest.MockContext(t, "user2/-/projects/4/4")
+ contexttest.LoadUser(t, ctx, 2)
ctx.ContextUser = ctx.Doer // user2
ctx.SetParams(":id", "4")
ctx.SetParams(":boardID", "4")