17 lines
358 B
Go
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_"))
|
|
}
|