aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/user
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-04-14 21:58:21 +0800
committerGitHub <noreply@github.com>2022-04-14 21:58:21 +0800
commitb8911fb45673fdc3fce587892c4d9215e7c15019 (patch)
treedf72d047049f53cdbe9cb5d16a03b814f29e9ca6 /routers/web/user
parent4dabc212c70d0cb0874d3af61d1ea24abd468f7e (diff)
downloadgitea-b8911fb45673fdc3fce587892c4d9215e7c15019.tar.gz
gitea-b8911fb45673fdc3fce587892c4d9215e7c15019.zip
Use a struct as test options (#19393)
* Use a struct as test options * Fix name * Fix test
Diffstat (limited to 'routers/web/user')
-rw-r--r--routers/web/user/main_test.go4
-rw-r--r--routers/web/user/setting/main_test.go4
2 files changed, 6 insertions, 2 deletions
diff --git a/routers/web/user/main_test.go b/routers/web/user/main_test.go
index 77b48d89fb..517957a85c 100644
--- a/routers/web/user/main_test.go
+++ b/routers/web/user/main_test.go
@@ -12,5 +12,7 @@ import (
)
func TestMain(m *testing.M) {
- unittest.MainTest(m, filepath.Join("..", "..", ".."))
+ unittest.MainTest(m, &unittest.TestOptions{
+ GiteaRootPath: filepath.Join("..", "..", ".."),
+ })
}
diff --git a/routers/web/user/setting/main_test.go b/routers/web/user/setting/main_test.go
index b6ed7f5b18..d4df464abd 100644
--- a/routers/web/user/setting/main_test.go
+++ b/routers/web/user/setting/main_test.go
@@ -12,5 +12,7 @@ import (
)
func TestMain(m *testing.M) {
- unittest.MainTest(m, filepath.Join("..", "..", "..", ".."))
+ unittest.MainTest(m, &unittest.TestOptions{
+ GiteaRootPath: filepath.Join("..", "..", "..", ".."),
+ })
}