15 lines
255 B
Go
15 lines
255 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestGenerateHash(t *testing.T) {
|
|
hash, err := GenerateHash("password", "pepper")
|
|
if err != nil {
|
|
t.Errorf("Unexpected error: %v", err)
|
|
}
|
|
if len(hash) == 0 {
|
|
t.Error("Expected hash, got empty string")
|
|
}
|
|
}
|