From 1f3423796eee06a126d3cab7c276e2d0f169b869 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Fri, 30 Oct 2015 13:36:51 -0400 Subject: Validate callback urls on the server and add help text to outgoing webhooks --- model/outgoing_webhook_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'model/outgoing_webhook_test.go') diff --git a/model/outgoing_webhook_test.go b/model/outgoing_webhook_test.go index 2ca48c291..0d1cd773e 100644 --- a/model/outgoing_webhook_test.go +++ b/model/outgoing_webhook_test.go @@ -80,6 +80,11 @@ func TestOutgoingWebhookIsValid(t *testing.T) { t.Fatal("should be invalid") } + o.CallbackURLs = []string{"nowhere.com/"} + if err := o.IsValid(); err == nil { + t.Fatal("should be invalid") + } + o.CallbackURLs = []string{"http://nowhere.com/"} if err := o.IsValid(); err != nil { t.Fatal(err) -- cgit v1.2.3-1-g7c22