mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-22 15:18:30 -04:00
Rename almost all Ctx functions (#22071)
This commit is contained in:
parent
097d4e30b1
commit
68704532c2
78 changed files with 562 additions and 611 deletions
|
@ -37,7 +37,7 @@ func TestTransferOwnership(t *testing.T) {
|
|||
doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 3})
|
||||
repo.Owner = unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID})
|
||||
assert.NoError(t, TransferOwnership(doer, doer, repo, nil))
|
||||
assert.NoError(t, TransferOwnership(db.DefaultContext, doer, doer, repo, nil))
|
||||
|
||||
transferredRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 3})
|
||||
assert.EqualValues(t, 2, transferredRepo.OwnerID)
|
||||
|
@ -70,7 +70,7 @@ func TestStartRepositoryTransferSetPermission(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
assert.False(t, hasAccess)
|
||||
|
||||
assert.NoError(t, StartRepositoryTransfer(doer, recipient, repo, nil))
|
||||
assert.NoError(t, StartRepositoryTransfer(db.DefaultContext, doer, recipient, repo, nil))
|
||||
|
||||
hasAccess, err = access_model.HasAccess(db.DefaultContext, recipient.ID, repo)
|
||||
assert.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue