summaryrefslogtreecommitdiffstats
path: root/model/outgoing_webhook_test.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-10-30 13:36:51 -0400
committerJoramWilander <jwawilander@gmail.com>2015-11-02 10:38:13 -0500
commit1f3423796eee06a126d3cab7c276e2d0f169b869 (patch)
tree06b8617093b32c0c85347a170fe3ebb18f5b992a /model/outgoing_webhook_test.go
parent9d34e95045e5e0ff1281fd1eb2e5b20b7bf6ac8f (diff)
downloadchat-1f3423796eee06a126d3cab7c276e2d0f169b869.tar.gz
chat-1f3423796eee06a126d3cab7c276e2d0f169b869.tar.bz2
chat-1f3423796eee06a126d3cab7c276e2d0f169b869.zip
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.go5
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)