diff options
author | Chris <ccbrown112@gmail.com> | 2017-11-30 14:55:44 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-30 14:55:44 -0600 |
commit | daebd26a2894d88eb4c703b3be75f042cd563fef (patch) | |
tree | 0dfd6d21a1c284271f366c1b8279833fc4e7ed30 /model/manifest_test.go | |
parent | eaca461ee35993c07936a5888c003153d9e9b24f (diff) | |
download | chat-daebd26a2894d88eb4c703b3be75f042cd563fef.tar.gz chat-daebd26a2894d88eb4c703b3be75f042cd563fef.tar.bz2 chat-daebd26a2894d88eb4c703b3be75f042cd563fef.zip |
PLT-8018: Bundled jira plugin (#7920)
* bundled jira plugin
* fix generated file formatting, add prepackaged key
* whoops, uploaded wrong file
* whitelist generated files for license check
* make it work for people without go/bin in their path
Diffstat (limited to 'model/manifest_test.go')
-rw-r--r-- | model/manifest_test.go | 68 |
1 files changed, 32 insertions, 36 deletions
diff --git a/model/manifest_test.go b/model/manifest_test.go index 3fdc13ec4..0edd1fed4 100644 --- a/model/manifest_test.go +++ b/model/manifest_test.go @@ -70,9 +70,8 @@ func TestManifestUnmarshal(t *testing.T) { SettingsSchema: &PluginSettingsSchema{ Header: "theheadertext", Footer: "thefootertext", - Settings: []*PluginSetting{ - &PluginSetting{ - Key: "thesetting", + Settings: map[string]*PluginSetting{ + "thesetting": &PluginSetting{ DisplayName: "thedisplayname", Type: PLUGIN_CONFIG_TYPE_DROPDOWN, HelpText: "thehelptext", @@ -101,16 +100,16 @@ settings_schema: header: theheadertext footer: thefootertext settings: - - key: thesetting - display_name: thedisplayname - type: dropdown - help_text: thehelptext - regenerate_help_text: theregeneratehelptext - placeholder: theplaceholder - options: - - display_name: theoptiondisplayname - value: thevalue - default: thedefault + thesetting: + display_name: thedisplayname + type: dropdown + help_text: thehelptext + regenerate_help_text: theregeneratehelptext + placeholder: theplaceholder + options: + - display_name: theoptiondisplayname + value: thevalue + default: thedefault `), &yamlResult)) assert.Equal(t, expected, yamlResult) @@ -126,23 +125,22 @@ settings_schema: "settings_schema": { "header": "theheadertext", "footer": "thefootertext", - "settings": [ - { - "key": "thesetting", - "display_name": "thedisplayname", - "type": "dropdown", - "help_text": "thehelptext", - "regenerate_help_text": "theregeneratehelptext", - "placeholder": "theplaceholder", - "options": [ - { - "display_name": "theoptiondisplayname", - "value": "thevalue" - } - ], - "default": "thedefault" - } - ] + "settings": { + "thesetting": { + "display_name": "thedisplayname", + "type": "dropdown", + "help_text": "thehelptext", + "regenerate_help_text": "theregeneratehelptext", + "placeholder": "theplaceholder", + "options": [ + { + "display_name": "theoptiondisplayname", + "value": "thevalue" + } + ], + "default": "thedefault" + } + } } }`), &jsonResult)) assert.Equal(t, expected, jsonResult) @@ -177,9 +175,8 @@ func TestManifestJson(t *testing.T) { SettingsSchema: &PluginSettingsSchema{ Header: "theheadertext", Footer: "thefootertext", - Settings: []*PluginSetting{ - &PluginSetting{ - Key: "thesetting", + Settings: map[string]*PluginSetting{ + "thesetting": &PluginSetting{ DisplayName: "thedisplayname", Type: PLUGIN_CONFIG_TYPE_DROPDOWN, HelpText: "thehelptext", @@ -242,9 +239,8 @@ func TestManifestClientManifest(t *testing.T) { SettingsSchema: &PluginSettingsSchema{ Header: "theheadertext", Footer: "thefootertext", - Settings: []*PluginSetting{ - &PluginSetting{ - Key: "thesetting", + Settings: map[string]*PluginSetting{ + "thesetting": &PluginSetting{ DisplayName: "thedisplayname", Type: PLUGIN_CONFIG_TYPE_DROPDOWN, HelpText: "thehelptext", |