From b8911fb45673fdc3fce587892c4d9215e7c15019 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 14 Apr 2022 21:58:21 +0800 Subject: Use a struct as test options (#19393) * Use a struct as test options * Fix name * Fix test --- models/user/main_test.go | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'models/user') diff --git a/models/user/main_test.go b/models/user/main_test.go index 55e5f9341c..09af550a95 100644 --- a/models/user/main_test.go +++ b/models/user/main_test.go @@ -12,13 +12,16 @@ import ( ) func TestMain(m *testing.M) { - unittest.MainTest(m, filepath.Join("..", ".."), - "email_address.yml", - "user_redirect.yml", - "follow.yml", - "user_open_id.yml", - "two_factor.yml", - "oauth2_application.yml", - "user.yml", - ) + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: filepath.Join("..", ".."), + FixtureFiles: []string{ + "email_address.yml", + "user_redirect.yml", + "follow.yml", + "user_open_id.yml", + "two_factor.yml", + "oauth2_application.yml", + "user.yml", + }, + }) } -- cgit v1.2.3