(t *testing.T)
| 105 | } |
| 106 | |
| 107 | func TestClientBadDeviceToken(t *testing.T) { |
| 108 | n := &apns.Notification{} |
| 109 | n.DeviceToken = "DGw\aOoD+HwSroh#Ug]%xzd]" |
| 110 | n.Payload = []byte(`{"aps":{"alert":"Hello!"}}`) |
| 111 | res, err := mockClient("https://api.push.apple.com").Push(n) |
| 112 | assert.Error(t, err) |
| 113 | assert.Nil(t, res) |
| 114 | } |
| 115 | |
| 116 | func TestClientNameToCertificate(t *testing.T) { |
| 117 | crt, _ := certificate.FromP12File("certificate/_fixtures/certificate-valid.p12", "") |
nothing calls this directly
no test coverage detected