1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-02-09 13:47:09 +02:00

Fix some tests

This commit is contained in:
Aaron L 2018-03-07 11:15:00 -08:00
parent 0eff53792f
commit f071b741da
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ func TestErrorHandler(t *testing.T) {
handler.ServeHTTP(nil, httptest.NewRequest("GET", "/target", nil))
if !strings.Contains(b.String(), "error at /target: error occurred") {
if !strings.Contains(b.String(), "error from (192.0.2.1:1234) /target: error occurred") {
t.Error("output was wrong:", b.String())
}
}

View File

@ -92,7 +92,7 @@ func (r *Register) Post(w http.ResponseWriter, req *http.Request) error {
storer := authboss.EnsureCanCreate(r.Config.Storage.Server)
user := authboss.MustBeAuthable(storer.New(req.Context()))
pass, err := bcrypt.GenerateFromPassword([]byte(password), r.Config.Modules.RegisterBCryptCost)
pass, err := bcrypt.GenerateFromPassword([]byte(password), r.Config.Modules.BCryptCost)
if err != nil {
return err
}