diff options
author | Chris <ccbrown112@gmail.com> | 2017-09-06 17:12:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 17:12:54 -0500 |
commit | 1adfd0e9be69a93c7f63bb7afc742c9fafe31aa3 (patch) | |
tree | 2766bacc1f045fa685ca3d8310cd6174d0311d09 /app/webhook_test.go | |
parent | b84bd21089d305333fa4114b95be70f5ad94ad1b (diff) | |
download | chat-1adfd0e9be69a93c7f63bb7afc742c9fafe31aa3.tar.gz chat-1adfd0e9be69a93c7f63bb7afc742c9fafe31aa3.tar.bz2 chat-1adfd0e9be69a93c7f63bb7afc742c9fafe31aa3.zip |
app type transition (#7167)
Diffstat (limited to 'app/webhook_test.go')
-rw-r--r-- | app/webhook_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/webhook_test.go b/app/webhook_test.go index 8333de0ee..49ffdf649 100644 --- a/app/webhook_test.go +++ b/app/webhook_test.go @@ -11,8 +11,9 @@ import ( ) func TestCreateWebhookPost(t *testing.T) { - th := Setup().InitBasic() - defer TearDown() + a := Global() + th := a.Setup().InitBasic() + defer a.TearDown() enableIncomingHooks := utils.Cfg.ServiceSettings.EnableIncomingWebhooks defer func() { @@ -22,13 +23,13 @@ func TestCreateWebhookPost(t *testing.T) { utils.Cfg.ServiceSettings.EnableIncomingWebhooks = true utils.SetDefaultRolesBasedOnConfig() - hook, err := CreateIncomingWebhookForChannel(th.BasicUser.Id, th.BasicChannel, &model.IncomingWebhook{ChannelId: th.BasicChannel.Id}) + hook, err := a.CreateIncomingWebhookForChannel(th.BasicUser.Id, th.BasicChannel, &model.IncomingWebhook{ChannelId: th.BasicChannel.Id}) if err != nil { t.Fatal(err.Error()) } - defer DeleteIncomingWebhook(hook.Id) + defer a.DeleteIncomingWebhook(hook.Id) - post, err := CreateWebhookPost(hook.UserId, th.BasicChannel, "foo", "user", "http://iconurl", model.StringInterface{ + post, err := a.CreateWebhookPost(hook.UserId, th.BasicChannel, "foo", "user", "http://iconurl", model.StringInterface{ "attachments": []*model.SlackAttachment{ &model.SlackAttachment{ Text: "text", |