summaryrefslogtreecommitdiffstats
path: root/api/post_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-09-28 12:08:16 -0400
committerCorey Hulen <corey@hulen.com>2017-09-28 09:08:16 -0700
commitf263d2b9510fb557fe075dee5097cb32e2b1e5e2 (patch)
tree5e7ca4a3b5e44a685b1e1f8761983dd57441a751 /api/post_test.go
parent884cf494cbef36786cb035b14bbbccbb19c122c3 (diff)
downloadchat-f263d2b9510fb557fe075dee5097cb32e2b1e5e2.tar.gz
chat-f263d2b9510fb557fe075dee5097cb32e2b1e5e2.tar.bz2
chat-f263d2b9510fb557fe075dee5097cb32e2b1e5e2.zip
PLT-7684 Add support to outgoing webhooks and slash commands to set post type and props (#7531)
* Add support to outgoing webhooks and slash commands to set post type and props * Fix nil access
Diffstat (limited to 'api/post_test.go')
-rw-r--r--api/post_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/api/post_test.go b/api/post_test.go
index 1fb6b3ded..f34141f77 100644
--- a/api/post_test.go
+++ b/api/post_test.go
@@ -295,6 +295,16 @@ func testCreatePostWithOutgoingHook(
}
}
+ resp := &model.OutgoingWebhookResponse{}
+ resp.Text = new(string)
+ *resp.Text = "some test text"
+ resp.Username = "testusername"
+ resp.IconURL = "http://www.mattermost.org/wp-content/uploads/2016/04/icon.png"
+ resp.Props = map[string]interface{}{"someprop": "somevalue"}
+ resp.Type = "custom_test"
+
+ w.Write([]byte(resp.ToJson()))
+
success <- true
}))
defer ts.Close()