mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Move almost all functions' parameter db.Engine to context.Context (#19748)
* Move almost all functions' parameter db.Engine to context.Context * remove some unnecessary wrap functions
This commit is contained in:
@ -45,7 +45,7 @@ func TestIsEmailUsed(t *testing.T) {
|
||||
func TestAddEmailAddress(t *testing.T) {
|
||||
assert.NoError(t, unittest.PrepareTestDatabase())
|
||||
|
||||
assert.NoError(t, AddEmailAddress(&EmailAddress{
|
||||
assert.NoError(t, AddEmailAddress(db.DefaultContext, &EmailAddress{
|
||||
Email: "user1234567890@example.com",
|
||||
LowerEmail: "user1234567890@example.com",
|
||||
IsPrimary: true,
|
||||
@ -53,7 +53,7 @@ func TestAddEmailAddress(t *testing.T) {
|
||||
}))
|
||||
|
||||
// ErrEmailAlreadyUsed
|
||||
err := AddEmailAddress(&EmailAddress{
|
||||
err := AddEmailAddress(db.DefaultContext, &EmailAddress{
|
||||
Email: "user1234567890@example.com",
|
||||
LowerEmail: "user1234567890@example.com",
|
||||
})
|
||||
|
Reference in New Issue
Block a user