summaryrefslogtreecommitdiffstats
path: root/model/outgoing_webhook_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/outgoing_webhook_test.go')
-rw-r--r--model/outgoing_webhook_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/model/outgoing_webhook_test.go b/model/outgoing_webhook_test.go
index 431b1f6c1..2412271b5 100644
--- a/model/outgoing_webhook_test.go
+++ b/model/outgoing_webhook_test.go
@@ -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")
+ }
+}