mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 12:14:08 -06:00
22 lines
428 B
Go
22 lines
428 B
Go
|
package pluginproxy
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
. "github.com/smartystreets/goconvey/convey"
|
||
|
)
|
||
|
|
||
|
func TestInterpolateString(t *testing.T) {
|
||
|
Convey("When interpolating string", t, func() {
|
||
|
data := templateData{
|
||
|
SecureJsonData: map[string]string{
|
||
|
"Test": "0asd+asd",
|
||
|
},
|
||
|
}
|
||
|
|
||
|
interpolated, err := InterpolateString("{{.SecureJsonData.Test}}", data)
|
||
|
So(err, ShouldBeNil)
|
||
|
So(interpolated, ShouldEqual, "0asd+asd")
|
||
|
})
|
||
|
}
|