summaryrefslogtreecommitdiffstats
path: root/app/webhook_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-11-21 13:08:32 -0600
committerChristopher Speller <crspeller@gmail.com>2017-11-21 11:08:32 -0800
commit816a30397da6ceff836d8723233dc5cdbda70871 (patch)
treed9075e04c6570296cea924b97088839f49d6ce9d /app/webhook_test.go
parent01e652ed481ed0ef0a8d8c021751655c1a58dd2a (diff)
downloadchat-816a30397da6ceff836d8723233dc5cdbda70871.tar.gz
chat-816a30397da6ceff836d8723233dc5cdbda70871.tar.bz2
chat-816a30397da6ceff836d8723233dc5cdbda70871.zip
Role refactor (#7867)
* role refactor * add missing file * fix web test
Diffstat (limited to 'app/webhook_test.go')
-rw-r--r--app/webhook_test.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/webhook_test.go b/app/webhook_test.go
index 9fef6fde3..13771a97f 100644
--- a/app/webhook_test.go
+++ b/app/webhook_test.go
@@ -11,7 +11,6 @@ import (
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/model"
- "github.com/mattermost/mattermost-server/utils"
)
func TestCreateWebhookPost(t *testing.T) {
@@ -19,12 +18,8 @@ func TestCreateWebhookPost(t *testing.T) {
defer th.TearDown()
enableIncomingHooks := th.App.Config().ServiceSettings.EnableIncomingWebhooks
- defer func() {
- th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableIncomingWebhooks = enableIncomingHooks })
- utils.SetDefaultRolesBasedOnConfig()
- }()
+ defer th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableIncomingWebhooks = enableIncomingHooks })
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})
if err != nil {