Move user related model into models/user (#17781)

* Move user related model into models/user

* Fix lint for windows

* Fix windows lint

* Fix windows lint

* Move some tests in models

* Merge
This commit is contained in:
Lunny Xiao 2021-11-24 17:49:20 +08:00 committed by GitHub
parent 4e7ca946da
commit a666829a37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
345 changed files with 4230 additions and 3813 deletions

View file

@ -14,6 +14,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/json"
"code.gitea.io/gitea/modules/lfs"
"code.gitea.io/gitea/modules/setting"
@ -26,7 +27,7 @@ func TestAPILFSNotStarted(t *testing.T) {
setting.LFS.StartServer = false
user := unittest.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User)
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}).(*user_model.User)
repo := unittest.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository)
req := NewRequestf(t, "POST", "/%s/%s.git/info/lfs/objects/batch", user.Name, repo.Name)
@ -46,7 +47,7 @@ func TestAPILFSMediaType(t *testing.T) {
setting.LFS.StartServer = true
user := unittest.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User)
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}).(*user_model.User)
repo := unittest.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository)
req := NewRequestf(t, "POST", "/%s/%s.git/info/lfs/objects/batch", user.Name, repo.Name)