diff options
author | Chris <ccbrown112@gmail.com> | 2017-11-09 14:46:20 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-09 14:46:20 -0600 |
commit | 10c5a927cb619f1aa2a599cbe3667820f4766bda (patch) | |
tree | f415540ab66115e62928d304c99b533398d7f226 /app/webhook_test.go | |
parent | b0c18ece0988b1573b2286bb73b32e48a1d8c59a (diff) | |
download | chat-10c5a927cb619f1aa2a599cbe3667820f4766bda.tar.gz chat-10c5a927cb619f1aa2a599cbe3667820f4766bda.tar.bz2 chat-10c5a927cb619f1aa2a599cbe3667820f4766bda.zip |
more global config ref cleanup (#7802)
Diffstat (limited to 'app/webhook_test.go')
-rw-r--r-- | app/webhook_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/webhook_test.go b/app/webhook_test.go index 8dc90b49b..f0cc0610a 100644 --- a/app/webhook_test.go +++ b/app/webhook_test.go @@ -18,12 +18,12 @@ func TestCreateWebhookPost(t *testing.T) { th := Setup().InitBasic() defer th.TearDown() - enableIncomingHooks := utils.Cfg.ServiceSettings.EnableIncomingWebhooks + enableIncomingHooks := th.App.Config().ServiceSettings.EnableIncomingWebhooks defer func() { - utils.Cfg.ServiceSettings.EnableIncomingWebhooks = enableIncomingHooks + th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableIncomingWebhooks = enableIncomingHooks }) utils.SetDefaultRolesBasedOnConfig() }() - utils.Cfg.ServiceSettings.EnableIncomingWebhooks = true + th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableIncomingWebhooks = true }) utils.SetDefaultRolesBasedOnConfig() hook, err := th.App.CreateIncomingWebhookForChannel(th.BasicUser.Id, th.BasicChannel, &model.IncomingWebhook{ChannelId: th.BasicChannel.Id}) |