gohorsejobs/backend/cmd/genhash/main_test.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")
}
}