Upgrade APNS to use HTTP/2

- uses universal certificate
- removes tests logs
- standardized returned promises from APNS and GCM to something usable in _PushStatus
This commit is contained in:
Florent Vilmart
2016-03-13 18:15:15 -04:00
parent a392c088d8
commit dad50d12f5
13 changed files with 316 additions and 463 deletions

View File

@@ -3,18 +3,20 @@ describe('Parse.Push', () => {
var pushAdapter = {
send: function(body, installations) {
var badge = body.data.badge;
installations.forEach((installation) => {
let promises = installations.map((installation) => {
if (installation.deviceType == "ios") {
expect(installation.badge).toEqual(badge);
expect(installation.originalBadge+1).toEqual(installation.badge);
} else {
expect(installation.badge).toBeUndefined();
}
return Promise.resolve({
err: null,
deviceType: installation.deviceType,
result: true
})
});
return Promise.resolve({
body: body,
installations: installations
});
return Promise.all(promises)
},
getValidPushTypes: function() {
return ["ios", "android"];
@@ -56,4 +58,4 @@ describe('Parse.Push', () => {
done();
});
});
});
});