diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-05-05 21:20:22 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-05-05 21:20:22 -0600 |
commit | eed10ce514f28e4acf772f76c92ca05eebec105f (patch) | |
tree | d76820d7a3cd23f09f7dd0e6065bb0cef7ba16dc /srv/chat/user_test.go | |
parent | cc8b6289ac3f7d1abb648217949beb89827d7374 (diff) |
Fix various problems with the srv build
Diffstat (limited to 'srv/chat/user_test.go')
-rw-r--r-- | srv/chat/user_test.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/srv/chat/user_test.go b/srv/chat/user_test.go deleted file mode 100644 index 2169cde..0000000 --- a/srv/chat/user_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package chat - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestUserIDCalculator(t *testing.T) { - - const name, password = "name", "password" - - c := NewUserIDCalculator([]byte("foo")) - - // calculating with same params twice should result in same UserID - userID := c.Calculate(name, password) - assert.Equal(t, userID, c.Calculate(name, password)) - - // changing either name or password should result in a different Hash - assert.NotEqual(t, userID.Hash, c.Calculate(name+"!", password).Hash) - assert.NotEqual(t, userID.Hash, c.Calculate(name, password+"!").Hash) - - // changing the secret should change the UserID - c.Secret = []byte("bar") - assert.NotEqual(t, userID, c.Calculate(name, password)) -} |