even more module updates!
This commit is contained in:
parent
935f8f5003
commit
8dd80e4806
@ -3,10 +3,11 @@ package services
|
||||
import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"go-cook/api/domain"
|
||||
"go-cook/api/repositories"
|
||||
"strings"
|
||||
|
||||
"git.jamestombleson.com/jtom38/go-cook/api/domain"
|
||||
"git.jamestombleson.com/jtom38/go-cook/api/repositories"
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
package services_test
|
||||
|
||||
import (
|
||||
"go-cook/api/services"
|
||||
"testing"
|
||||
|
||||
"git.jamestombleson.com/jtom38/go-cook/api/services"
|
||||
|
||||
"github.com/DATA-DOG/go-sqlmock"
|
||||
)
|
||||
|
||||
@ -23,7 +24,7 @@ func TestPasswordIsLongEnough(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestPasswordIsToShort(t *testing.T){
|
||||
func TestPasswordIsToShort(t *testing.T) {
|
||||
db, _, err := sqlmock.New()
|
||||
if err != nil {
|
||||
t.Log(err.Error())
|
||||
@ -35,11 +36,11 @@ func TestPasswordIsToShort(t *testing.T){
|
||||
err = client.CheckPasswordForRequirements("short")
|
||||
if err != nil {
|
||||
msg := err.Error()
|
||||
if (msg != services.ErrPasswordNotLongEnough) {
|
||||
if msg != services.ErrPasswordNotLongEnough {
|
||||
t.Log("wrong error")
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
t.Logf("expected a err")
|
||||
t.FailNow()
|
||||
|
Loading…
Reference in New Issue
Block a user