diff options
author | Corey Hulen <corey@hulen.com> | 2017-08-18 15:58:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-18 15:58:26 -0700 |
commit | 4a8afebcdb8e8c88b4191d68cb1b5712d12cee9c (patch) | |
tree | fba1b8f62db029d510fc3513fd8febece8925e27 /model/incoming_webhook_test.go | |
parent | 2b3f7d0bc3c0cd415e9e8f0a1cf0af6e6bac5b8a (diff) | |
download | chat-4a8afebcdb8e8c88b4191d68cb1b5712d12cee9c.tar.gz chat-4a8afebcdb8e8c88b4191d68cb1b5712d12cee9c.tar.bz2 chat-4a8afebcdb8e8c88b4191d68cb1b5712d12cee9c.zip |
Adding debugging for webhook (#7199)
* Adding debugging for webhook
* Fixing build error
* Moving error down
Diffstat (limited to 'model/incoming_webhook_test.go')
-rw-r--r-- | model/incoming_webhook_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/model/incoming_webhook_test.go b/model/incoming_webhook_test.go index 36f8ed6e6..a716432f2 100644 --- a/model/incoming_webhook_test.go +++ b/model/incoming_webhook_test.go @@ -108,7 +108,7 @@ func TestIncomingWebhookRequestFromJson_Announcements(t *testing.T) { // simple payload payload := `{"text": "` + text + `"}` data := strings.NewReader(payload) - iwr := IncomingWebhookRequestFromJson(data) + iwr, _ := IncomingWebhookRequestFromJson(data) if iwr == nil { t.Fatal("IncomingWebhookRequest should not be nil") @@ -136,7 +136,7 @@ func TestIncomingWebhookRequestFromJson_Announcements(t *testing.T) { }` data = strings.NewReader(payload) - iwr = IncomingWebhookRequestFromJson(data) + iwr, _ = IncomingWebhookRequestFromJson(data) if iwr == nil { t.Fatal("IncomingWebhookRequest should not be nil") @@ -213,7 +213,7 @@ func TestIncomingWebhookRequestFromJson(t *testing.T) { // try to create an IncomingWebhookRequest from the payload data := strings.NewReader(payload) - iwr := IncomingWebhookRequestFromJson(data) + iwr, _ := IncomingWebhookRequestFromJson(data) // After it has been decoded, the JSON string won't contain the escape char anymore expected := strings.Replace(text, `\"`, `"`, -1) @@ -233,7 +233,7 @@ func TestIncomingWebhookRequestFromJson(t *testing.T) { func TestIncomingWebhookNullArrayItems(t *testing.T) { payload := `{"attachments":[{"fields":[{"title":"foo","value":"bar","short":true}, null]}, null]}` - iwr := IncomingWebhookRequestFromJson(strings.NewReader(payload)) + iwr, _ := IncomingWebhookRequestFromJson(strings.NewReader(payload)) if iwr == nil { t.Fatal("IncomingWebhookRequest should not be nil") } |