Skip to content

Commit

Permalink
check for error in message.AddAttachment
Browse files Browse the repository at this point in the history
  • Loading branch information
antcs committed Aug 17, 2020
1 parent c8ad547 commit abcb6b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,10 @@ func TestMutlipartRequest(t *testing.T) {
if tc.attachmentSize > 0 {
buf := make([]byte, tc.attachmentSize)
attachement := bytes.NewBuffer(buf)
message.AddAttachment(attachement)
err := message.AddAttachment(attachement)
if err != nil {
t.Fatalf("unexpected error: %s", err.Error())
}
}

req, err := message.multipartRequest("pToken", "rToken", "url")
Expand Down

0 comments on commit abcb6b6

Please sign in to comment.