apns icon indicating copy to clipboard operation
apns copied to clipboard

Tests for errors from Apple

Open nathany opened this issue 9 years ago • 4 comments

I'd like some tests for errors from Apple but without actually hitting Apple's servers in the test suite.

Status code Description
0 No errors encountered
1 Processing error
2 Missing device token
3 Missing topic
4 Missing payload
5 Invalid token size
6 Invalid topic size
7 Invalid payload size
8 Invalid token
10 Shutdown
255 None (unknown)

~~I'm thinking about mockConn having a special device token that results in 8 Invalid token, or that sort of thing. A bit like test credit cards.~~

My thought is to only do this for tests within the apns package, not impacting the callers of this library in any way.

nathany avatar Apr 21 '15 22:04 nathany