mirror of
https://github.com/go-gitea/gitea
synced 2025-08-12 04:28:21 +00:00
* fix missing password length check when change password * add tests for change password
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
|
||||
"github.com/go-macaron/session"
|
||||
"github.com/stretchr/testify/assert"
|
||||
macaron "gopkg.in/macaron.v1"
|
||||
)
|
||||
@@ -33,6 +34,9 @@ func MockContext(t *testing.T) *context.Context {
|
||||
macaronContext.Render = &mockRender{ResponseWriter: macaronContext.Resp}
|
||||
return &context.Context{
|
||||
Context: macaronContext,
|
||||
Flash: &session.Flash{
|
||||
Values: make(url.Values),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user