You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/internal/event/id_test.go

22 lines
420 B

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package event
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func Test_newId(t *testing.T) {
t.Run("basics", func(t *testing.T) {
assert, require := assert.New(t), require.New(t)
got, err := NewId("pre")
require.NoError(err)
assert.True(strings.HasPrefix(got, "pre"))
})
}