2023-02-02 17:15:17 -08:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
|
|
2021-06-06 07:57:24 -04:00
|
|
|
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)
|
2021-07-25 17:40:54 -04:00
|
|
|
got, err := NewId("pre")
|
2021-06-06 07:57:24 -04:00
|
|
|
require.NoError(err)
|
|
|
|
|
assert.True(strings.HasPrefix(got, "pre"))
|
|
|
|
|
})
|
|
|
|
|
}
|