Files

27 lines
496 B
Go

package config
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSanitizeEnvKey(t *testing.T) {
tests := []struct {
input string
expected string
}{
{"[email protected]", "USER_EXAMPLE_COM"},
{"[email protected]", "TEST_SUB_DOMAIN_ORG"},
{"[email protected]", "USER_NAME_TEST_IO"},
{"simple", "SIMPLE"},
}
for _, tt := range tests {
t.Run(tt.input, func(t *testing.T) {
got := sanitizeEnvKey(tt.input)
assert.Equal(t, tt.expected, got)
})
}
}