1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
package ses_test
import (
"encoding/json"
"gopkg.in/check.v1"
"github.com/AdRoll/goamz/exp/ses"
)
func (s *S) TestSNSBounceNotificationUnmarshalling(c *check.C) {
notification := ses.SNSNotification{}
err := json.Unmarshal([]byte(SNSBounceNotification), ¬ification)
c.Assert(err, check.IsNil)
c.Assert(notification.Bounce, check.NotNil)
}
func (s *S) TestSNSComplaintNotificationUnmarshalling(c *check.C) {
notification := ses.SNSNotification{}
err := json.Unmarshal([]byte(SNSComplaintNotification), ¬ification)
c.Assert(err, check.IsNil)
c.Assert(notification.Complaint, check.NotNil)
}
func (s *S) TestSNSDeliveryNotificationUnmarshalling(c *check.C) {
notification := ses.SNSNotification{}
err := json.Unmarshal([]byte(SNSDeliveryNotification), ¬ification)
c.Assert(err, check.IsNil)
c.Assert(notification.Delivery, check.NotNil)
}
|