trepa/internal/core/hash_test.go
2025-03-12 21:36:57 +00:00

21 lines
458 B
Go

package core
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestHashPassword(t *testing.T) {
password := "password"
hashedPassword := HashPassword(password)
assert.NotEmpty(t, hashedPassword)
t.Log(hashedPassword)
assert.Equal(t, hashedPassword, "LOLPASSWORD")
}
func TestComparePassword(t *testing.T) {
password := "password"
hashedPassword := HashPassword(password)
assert.True(t, ComparePassword(password, hashedPassword))
}