diff options
Diffstat (limited to 'bcrypt/bcrypt_test.go')
| -rw-r--r-- | bcrypt/bcrypt_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bcrypt/bcrypt_test.go b/bcrypt/bcrypt_test.go index b7162d8..8b589e3 100644 --- a/bcrypt/bcrypt_test.go +++ b/bcrypt/bcrypt_test.go @@ -241,3 +241,10 @@ func TestNoSideEffectsFromCompare(t *testing.T) { t.Errorf("got=%q want=%q", got, want) } } + +func TestPasswordTooLong(t *testing.T) { + _, err := GenerateFromPassword(make([]byte, 73), 1) + if err != ErrPasswordTooLong { + t.Errorf("unexpected error: got %q, want %q", err, ErrPasswordTooLong) + } +} |
