diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-11-02 14:13:34 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-02 14:13:34 -0500 |
commit | 31eee1ef6ebb59a89885ef7e3ebd6801f9a396d4 (patch) | |
tree | c21e52d00aa42dbb8e7f0077f259014eeaa8cbaf /model/outgoing_webhook_test.go | |
parent | 17233b1dce530eef75e16944da7abdb060d2c27e (diff) | |
parent | 1f3423796eee06a126d3cab7c276e2d0f169b869 (diff) | |
download | chat-31eee1ef6ebb59a89885ef7e3ebd6801f9a396d4.tar.gz chat-31eee1ef6ebb59a89885ef7e3ebd6801f9a396d4.tar.bz2 chat-31eee1ef6ebb59a89885ef7e3ebd6801f9a396d4.zip |
Merge pull request #1268 from mattermost/plt-514
PLT-514 Validate callback urls on the server and add help text to outgoing webhooks
Diffstat (limited to 'model/outgoing_webhook_test.go')
-rw-r--r-- | model/outgoing_webhook_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
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) |