From 4da0257bd52f20734d6d98c33ea5d824d98abbf5 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 7 Dec 2017 17:03:11 -0500 Subject: Add diagnostic for zoom plugin (#7958) --- app/diagnostics_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'app/diagnostics_test.go') diff --git a/app/diagnostics_test.go b/app/diagnostics_test.go index 9b884fd43..0d1c7acd8 100644 --- a/app/diagnostics_test.go +++ b/app/diagnostics_test.go @@ -43,6 +43,20 @@ func TestPluginSetting(t *testing.T) { assert.Equal(t, "asd", pluginSetting(settings, "test", "qwe", "asd")) } +func TestPluginActivated(t *testing.T) { + states := map[string]*model.PluginState{ + "foo": &model.PluginState{ + Enable: true, + }, + "bar": &model.PluginState{ + Enable: false, + }, + } + assert.True(t, pluginActivated(states, "foo")) + assert.False(t, pluginActivated(states, "bar")) + assert.False(t, pluginActivated(states, "none")) +} + func TestDiagnostics(t *testing.T) { th := Setup().InitBasic() defer th.TearDown() -- cgit v1.2.3-1-g7c22