summaryrefslogtreecommitdiffstats
path: root/app/diagnostics_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-08-02 01:36:54 -0700
committerGitHub <noreply@github.com>2017-08-02 01:36:54 -0700
commit65817e13c7900ea81947e40e177459cfea8acee4 (patch)
tree8dfc88db36844e4186b4110753be8de976da6371 /app/diagnostics_test.go
parentc6bf235ec2a8613d8ef35607e2aeb8c0cb629f45 (diff)
downloadchat-65817e13c7900ea81947e40e177459cfea8acee4.tar.gz
chat-65817e13c7900ea81947e40e177459cfea8acee4.tar.bz2
chat-65817e13c7900ea81947e40e177459cfea8acee4.zip
PLT-6965 jira integration (plus plugin scaffolding) (#6918)
* plugin scaffolding / jira integration * add vendored testify packages * webhook fix * don't change i18n ids * support configuration watching * add basic jira plugin configuration to admin console * fix eslint errors * fix another eslint warning * polish * undo unintentional config.json commit >:( * test fix * add jira plugin diagnostics, remove dm support, add bot tag, generate web-safe secrets * rebase, implement requested changes * requested changes * remove tests and minimize makefile change * add missing license headers * add missing comma * remove bad line from Makefile
Diffstat (limited to 'app/diagnostics_test.go')
-rw-r--r--app/diagnostics_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/diagnostics_test.go b/app/diagnostics_test.go
index 80c12fd2d..57e9eaf79 100644
--- a/app/diagnostics_test.go
+++ b/app/diagnostics_test.go
@@ -28,6 +28,24 @@ func newTestServer() (chan string, *httptest.Server) {
return result, server
}
+func TestPluginSetting(t *testing.T) {
+ before := utils.Cfg.PluginSettings.Plugins
+ utils.Cfg.PluginSettings.Plugins = map[string]interface{}{
+ "test": map[string]string{
+ "foo": "bar",
+ },
+ }
+ defer func() {
+ utils.Cfg.PluginSettings.Plugins = before
+ }()
+ if pluginSetting("test", "foo", "asd") != "bar" {
+ t.Fatal()
+ }
+ if pluginSetting("test", "qwe", "asd") != "asd" {
+ t.Fatal()
+ }
+}
+
func TestDiagnostics(t *testing.T) {
Setup().InitBasic()
@@ -116,6 +134,7 @@ func TestDiagnostics(t *testing.T) {
TRACK_CONFIG_SUPPORT,
TRACK_CONFIG_NATIVEAPP,
TRACK_CONFIG_ANALYTICS,
+ TRACK_CONFIG_PLUGIN,
TRACK_ACTIVITY,
TRACK_SERVER,
} {