From 10c5a927cb619f1aa2a599cbe3667820f4766bda Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 9 Nov 2017 14:46:20 -0600 Subject: more global config ref cleanup (#7802) --- app/webhook_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/webhook_test.go') 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}) -- cgit v1.2.3-1-g7c22