diff --git a/cmd/mattermost/commands/webhook_test.go b/cmd/mattermost/commands/webhook_test.go index 21eed2e8bf..2bd67d11f2 100644 --- a/cmd/mattermost/commands/webhook_test.go +++ b/cmd/mattermost/commands/webhook_test.go @@ -68,16 +68,16 @@ func TestShowWebhook(t *testing.T) { config := th.Config() *config.ServiceSettings.EnableCommands = true - config.ServiceSettings.EnableIncomingWebhooks = true - config.ServiceSettings.EnableOutgoingWebhooks = true - config.ServiceSettings.EnablePostUsernameOverride = true - config.ServiceSettings.EnablePostIconOverride = true + *config.ServiceSettings.EnableIncomingWebhooks = true + *config.ServiceSettings.EnableOutgoingWebhooks = true + *config.ServiceSettings.EnablePostUsernameOverride = true + *config.ServiceSettings.EnablePostIconOverride = true th.SetConfig(config) - th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableIncomingWebhooks = true }) - th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableOutgoingWebhooks = true }) - th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnablePostUsernameOverride = true }) - th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnablePostIconOverride = true }) + th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableIncomingWebhooks = true }) + th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableOutgoingWebhooks = true }) + th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnablePostUsernameOverride = true }) + th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnablePostIconOverride = true }) defaultRolePermissions := th.SaveDefaultRolePermissions() defer func() {