MCPcopy
hub / github.com/sideshow/apns2 / TestClientBadDeviceToken

Function TestClientBadDeviceToken

client_test.go:107–114  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func 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
116func TestClientNameToCertificate(t *testing.T) {
117 crt, _ := certificate.FromP12File("certificate/_fixtures/certificate-valid.p12", "")

Callers

nothing calls this directly

Calls 2

mockClientFunction · 0.85
PushMethod · 0.80

Tested by

no test coverage detected