summaryrefslogtreecommitdiffstats
path: root/app/webhook_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/webhook_test.go')
-rw-r--r--app/webhook_test.go6
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})