1
Fork 0

Move user follow and openid into models/user/ (#17613)

* Move UserRedirect into models/user/

* Fix lint & test

* Fix lint

* Fix lint

* remove nolint comment

* Fix lint

* Move user follow and openid into models/user

* Ignore the lint

* Ignore the lint

* Fix test

* ignore stutters lint on UserOpenID
This commit is contained in:
Lunny Xiao 2021-11-17 17:58:31 +08:00 committed by GitHub
parent adda27668b
commit 95d3266bee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 155 additions and 143 deletions

View file

@ -11,12 +11,13 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
)
func assertUserDeleted(t *testing.T, userID int64) {
unittest.AssertNotExistsBean(t, &models.User{ID: userID})
unittest.AssertNotExistsBean(t, &models.Follow{UserID: userID})
unittest.AssertNotExistsBean(t, &models.Follow{FollowID: userID})
unittest.AssertNotExistsBean(t, &user_model.Follow{UserID: userID})
unittest.AssertNotExistsBean(t, &user_model.Follow{FollowID: userID})
unittest.AssertNotExistsBean(t, &models.Repository{OwnerID: userID})
unittest.AssertNotExistsBean(t, &models.Access{UserID: userID})
unittest.AssertNotExistsBean(t, &models.OrgUser{UID: userID})