Files
softplayer-backend/internal/helpers/token/token_test.go
Nikolai Rodionov cfa666e0a2
All checks were successful
ci/woodpecker/push/build Pipeline was successful
Token authorization is ready for MVP
Reviewed-on: #8
2026-05-15 12:53:58 +00:00

17 lines
358 B
Go

package token_test
import (
"strings"
"testing"
"gitea.badhouseplants.net/softplayer/softplayer-backend/internal/helpers/token"
"github.com/stretchr/testify/assert"
)
func TestUnitTokenGeneration(t *testing.T) {
token, err := token.GenerateToken()
assert.NoError(t, err)
assert.Len(t, token, 44)
assert.True(t, strings.HasPrefix(token, "sft_"))
}