Skip to content

Commit 9acd2b2

Browse files
committed
updated changed tests
1 parent 01480a7 commit 9acd2b2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

encode_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
package passwordEncoder
1+
package password
22

33
import (
44
"encoding/hex"
55
"reflect"
66
"testing"
77
)
88

9-
func TestEncodePassword(t *testing.T) {
10-
salt, encoded := EncodePassword("random string", nil)
9+
func TestEncode(t *testing.T) {
10+
salt, encoded := Encode("random string", nil)
1111
if !reflect.DeepEqual(len([]byte(salt)), defaultSaltLen) {
1212
t.Error("Received length of salt:", len([]byte(salt)), "Expected length of salt:", defaultSaltLen)
1313
}
@@ -20,9 +20,9 @@ func TestEncodePassword(t *testing.T) {
2020
}
2121
}
2222

23-
func TestVerifyPassword(t *testing.T) {
24-
salt, encoded := EncodePassword("a high level password", nil)
25-
if !VerifyPassword("a high level password", salt, encoded, nil) {
23+
func TestVerify(t *testing.T) {
24+
salt, encoded := Encode("a high level password", nil)
25+
if !Verify("a high level password", salt, encoded, nil) {
2626
t.Error("Error while verifying password, check the function")
2727
}
2828
}

0 commit comments

Comments
 (0)