diff options
| author | mihna123 <mihailonvojinovic@gmail.com> | 2026-08-29 23:38:34 +0200 |
|---|---|---|
| committer | mihna123 <mihailonvojinovic@gmail.com> | 2026-08-29 23:38:34 +0200 |
| commit | 3380048b011c8f9289f16c4e39b72013424923cf (patch) | |
| tree | 9035840688c572df1513a850e6d0e534f5d1512c /internal | |
| parent | 41d4965db78414ba53237f791919ae17c0b99e14 (diff) | |
| download | openstore-3380048b011c8f9289f16c4e39b72013424923cf.tar.gz openstore-3380048b011c8f9289f16c4e39b72013424923cf.zip | |
user: add bcryptCost to service constructor in TestRegisterRepositotyError
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/user/service_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/user/service_test.go b/internal/user/service_test.go index 938d2c3..16353d2 100644 --- a/internal/user/service_test.go +++ b/internal/user/service_test.go @@ -79,7 +79,11 @@ func TestRegisterExistingUser(t *testing.T) { } func TestRegisterRepositoryError(t *testing.T) { - s := &Service{repository: &RepositoryMock{err: errors.New("db down")}} + s := &Service{ + repository: &RepositoryMock{err: errors.New("db down")}, + bcryptCost: bcrypt.MinCost, + } + in := &RegisterInput{Username: "bob", Email: "b@b.com", Password: "thisissecure"} _, err := s.Register(in) |
