summaryrefslogtreecommitdiffstats
path: root/app/channel_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/channel_test.go')
-rw-r--r--app/channel_test.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/app/channel_test.go b/app/channel_test.go
index b1d403896..374b20657 100644
--- a/app/channel_test.go
+++ b/app/channel_test.go
@@ -4,21 +4,16 @@ import (
"testing"
"github.com/mattermost/mattermost-server/model"
- "github.com/mattermost/mattermost-server/utils"
)
func TestPermanentDeleteChannel(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
- incomingWasEnabled := utils.Cfg.ServiceSettings.EnableIncomingWebhooks
- outgoingWasEnabled := utils.Cfg.ServiceSettings.EnableOutgoingWebhooks
- utils.Cfg.ServiceSettings.EnableIncomingWebhooks = true
- utils.Cfg.ServiceSettings.EnableOutgoingWebhooks = true
- defer func() {
- utils.Cfg.ServiceSettings.EnableIncomingWebhooks = incomingWasEnabled
- utils.Cfg.ServiceSettings.EnableOutgoingWebhooks = outgoingWasEnabled
- }()
+ th.App.UpdateConfig(func(cfg *model.Config) {
+ cfg.ServiceSettings.EnableIncomingWebhooks = true
+ cfg.ServiceSettings.EnableOutgoingWebhooks = true
+ })
channel, err := th.App.CreateChannel(&model.Channel{DisplayName: "deletion-test", Name: "deletion-test", Type: model.CHANNEL_OPEN, TeamId: th.BasicTeam.Id}, false)
if err != nil {