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
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
884cf494cb
Коммит
f263d2b951
@@ -176,3 +176,16 @@ func TestOutgoingWebhookTriggerWordStartsWith(t *testing.T) {
|
||||
t.Fatal("Should return false")
|
||||
}
|
||||
}
|
||||
|
||||
func TestOutgoingWebhookResponseJson(t *testing.T) {
|
||||
o := OutgoingWebhookResponse{}
|
||||
o.Text = new(string)
|
||||
*o.Text = "some text"
|
||||
|
||||
json := o.ToJson()
|
||||
ro := OutgoingWebhookResponseFromJson(strings.NewReader(json))
|
||||
|
||||
if *o.Text != *ro.Text {
|
||||
t.Fatal("Text does not match")
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user