octoplex/shortid/shortid_test.go
2025-02-24 05:54:40 +01:00

18 lines
299 B
Go

package shortid_test
import (
"testing"
"git.netflux.io/rob/termstream/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)
}