riya_business_travel_8.0.0_.../pkg/api/pluginproxy/utils_test.go
venbatechnologies@gmail.com 565484c22d Modified initial commit
2021-07-05 14:17:23 +05:30

21 lines
401 B
Go

package pluginproxy
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestInterpolateString(t *testing.T) {
data := templateData{
SecureJsonData: map[string]string{
"Test": "0asd+asd",
},
}
interpolated, err := interpolateString("{{.SecureJsonData.Test}}", data)
require.NoError(t, err)
assert.Equal(t, "0asd+asd", interpolated)
}