Token authorization is ready for MVP
All checks were successful
ci/woodpecker/push/build Pipeline was successful

Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
2026-05-15 12:53:58 +00:00
parent 35c6689a2c
commit cfa666e0a2
18 changed files with 917 additions and 61 deletions

View File

@@ -4,17 +4,17 @@ import (
"testing"
"gitea.badhouseplants.net/softplayer/softplayer-backend/internal/helpers/hash"
"github.com/alecthomas/assert/v2"
"github.com/stretchr/testify/assert"
)
func TestHashValid(t *testing.T) {
func TestUnitHashValid(t *testing.T) {
password := "qwertyu9"
hpass, err := hash.HashPassword(password, 10)
assert.NoError(t, err)
assert.NoError(t, hash.CheckPasswordHash(password, hpass))
}
func TestHashInvalid(t *testing.T) {
func TestUnitHashInvalid(t *testing.T) {
password := "qwertyu9"
invhash := "qwertyu9"
assert.Error(t, hash.CheckPasswordHash(password, invhash))