File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,21 @@ func TestDecode(t *testing.T) {
1212 const (
1313 legacyVariable = "Legacy Variable"
1414 legacyVariableName = "Legacy Variable Name"
15+
16+ displayName = "Display Name"
1517 )
1618
1719 aMap := map [string ]interface {}{
1820 "name" : "Parameter Name" ,
21+ "display_name" : displayName ,
1922 "legacy_variable" : legacyVariable ,
2023 "legacy_variable_name" : legacyVariableName ,
2124 }
2225
2326 var param provider.Parameter
2427 err := mapstructure .Decode (aMap , & param )
2528 require .NoError (t , err )
29+ require .Equal (t , displayName , param .DisplayName )
2630 require .Equal (t , legacyVariable , param .LegacyVariable )
2731 require .Equal (t , legacyVariableName , param .LegacyVariableName )
2832}
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ const (
4242type Parameter struct {
4343 Value string
4444 Name string
45- DisplayName string
45+ DisplayName string `mapstructure:"display_name"`
4646 Description string
4747 Type string
4848 Mutable bool
You can’t perform that action at this time.
0 commit comments