octoplex/internal/shortid/shortid_test.go
2025-03-09 19:58:25 +01:00

18 lines
306 B
Go

package shortid_test
import (
"testing"
"git.netflux.io/rob/octoplex/internal/shortid"
"github.com/stretchr/testify/assert"
)
func TestShortID(t *testing.T) {
id := shortid.New()
assert.Len(t, id, 6)
assert.Len(t, id.String(), 12)
anotherID := shortid.New()
assert.NotEqual(t, id, anotherID)
}