1
1
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 (#3039) (#3071)

* fix missing password length check when change password

* add tests for change password
This commit is contained in:
Lunny Xiao
2017-12-03 09:49:25 +08:00
committed by GitHub
parent ce4a52c22c
commit 3d688bd2cc
3 changed files with 75 additions and 1 deletions

View File

@@ -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),
},
}
}