diff options
Diffstat (limited to 'routers/web/admin/users_test.go')
-rw-r--r-- | routers/web/admin/users_test.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/routers/web/admin/users_test.go b/routers/web/admin/users_test.go index 62b35ea286..607ef2ea66 100644 --- a/routers/web/admin/users_test.go +++ b/routers/web/admin/users_test.go @@ -8,7 +8,6 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/unittest" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -24,7 +23,7 @@ func TestNewUserPost_MustChangePassword(t *testing.T) { unittest.PrepareTestEnv(t) ctx := test.MockContext(t, "admin/users/new") - u := db.AssertExistsAndLoadBean(t, &models.User{ + u := unittest.AssertExistsAndLoadBean(t, &models.User{ IsAdmin: true, ID: 2, }).(*models.User) @@ -61,7 +60,7 @@ func TestNewUserPost_MustChangePasswordFalse(t *testing.T) { unittest.PrepareTestEnv(t) ctx := test.MockContext(t, "admin/users/new") - u := db.AssertExistsAndLoadBean(t, &models.User{ + u := unittest.AssertExistsAndLoadBean(t, &models.User{ IsAdmin: true, ID: 2, }).(*models.User) @@ -98,7 +97,7 @@ func TestNewUserPost_InvalidEmail(t *testing.T) { unittest.PrepareTestEnv(t) ctx := test.MockContext(t, "admin/users/new") - u := db.AssertExistsAndLoadBean(t, &models.User{ + u := unittest.AssertExistsAndLoadBean(t, &models.User{ IsAdmin: true, ID: 2, }).(*models.User) @@ -128,7 +127,7 @@ func TestNewUserPost_VisibilityDefaultPublic(t *testing.T) { unittest.PrepareTestEnv(t) ctx := test.MockContext(t, "admin/users/new") - u := db.AssertExistsAndLoadBean(t, &models.User{ + u := unittest.AssertExistsAndLoadBean(t, &models.User{ IsAdmin: true, ID: 2, }).(*models.User) @@ -166,7 +165,7 @@ func TestNewUserPost_VisibilityPrivate(t *testing.T) { unittest.PrepareTestEnv(t) ctx := test.MockContext(t, "admin/users/new") - u := db.AssertExistsAndLoadBean(t, &models.User{ + u := unittest.AssertExistsAndLoadBean(t, &models.User{ IsAdmin: true, ID: 2, }).(*models.User) |