From 8dae6a5044f9c1b7a8497cc1c96155fd262b40cf Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 26 Oct 2017 01:41:16 +0200 Subject: iphone x fixes --- .../phonegap-plugin-push/spec/index.spec.js | 72 +++++++++++----------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'StoneIsland/plugins/phonegap-plugin-push/spec/index.spec.js') diff --git a/StoneIsland/plugins/phonegap-plugin-push/spec/index.spec.js b/StoneIsland/plugins/phonegap-plugin-push/spec/index.spec.js index e41accd2..8e1c2665 100644 --- a/StoneIsland/plugins/phonegap-plugin-push/spec/index.spec.js +++ b/StoneIsland/plugins/phonegap-plugin-push/spec/index.spec.js @@ -193,7 +193,7 @@ describe('phonegap-plugin-push', function () { push.off('notification', eventHandler); - expect(push.handlers.notification.indexOf(eventHandler)).toEqual(-1); + expect(push._handlers.notification.indexOf(eventHandler)).toEqual(-1); done(); }); }); @@ -208,7 +208,7 @@ describe('phonegap-plugin-push', function () { push.off('registration', eventHandler); - expect(push.handlers.registration.indexOf(eventHandler)).toEqual(-1); + expect(push._handlers.registration.indexOf(eventHandler)).toEqual(-1); done(); }); }); @@ -222,7 +222,7 @@ describe('phonegap-plugin-push', function () { push.on('error', eventHandler); push.off('error', eventHandler); - expect(push.handlers.error.indexOf(eventHandler)).toEqual(-1); + expect(push._handlers.error.indexOf(eventHandler)).toEqual(-1); done(); }); }); @@ -233,19 +233,19 @@ describe('phonegap-plugin-push', function () { eventHandler = function () { }; - expect(push.handlers.registration.length).toEqual(0); + expect(push._handlers.registration.length).toEqual(0); push.on('registration',eventHandler); - expect(push.handlers.registration.length).toEqual(1); - expect(push.handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1); + expect(push._handlers.registration.length).toEqual(1); + expect(push._handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1); execSpy.andCallFake(function (win, fail, service, id, args) { win(); }); push.unregister(function() { - expect(push.handlers.registration.length).toEqual(0); - expect(push.handlers.registration.indexOf(eventHandler)).toEqual(-1); + expect(push._handlers.registration.length).toEqual(0); + expect(push._handlers.registration.indexOf(eventHandler)).toEqual(-1); done(); }); }); @@ -255,19 +255,19 @@ describe('phonegap-plugin-push', function () { eventHandler = function () { }; - expect(push.handlers.notification.length).toEqual(0); + expect(push._handlers.notification.length).toEqual(0); push.on('notification', eventHandler); - expect(push.handlers.notification.length).toEqual(1); - expect(push.handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1); + expect(push._handlers.notification.length).toEqual(1); + expect(push._handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1); execSpy.andCallFake(function (win, fail, service, id, args) { win(); }); push.unregister(function() { - expect(push.handlers.notification.length).toEqual(0); - expect(push.handlers.notification.indexOf(eventHandler)).toEqual(-1); + expect(push._handlers.notification.length).toEqual(0); + expect(push._handlers.notification.indexOf(eventHandler)).toEqual(-1); done(); }); }); @@ -277,19 +277,19 @@ describe('phonegap-plugin-push', function () { eventHandler = function () { }; - expect(push.handlers.error.length).toEqual(0); + expect(push._handlers.error.length).toEqual(0); push.on('error', eventHandler); - expect(push.handlers.error.length).toEqual(1); - expect(push.handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1); + expect(push._handlers.error.length).toEqual(1); + expect(push._handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1); execSpy.andCallFake(function (win, fail, service, id, args) { win(); }); push.unregister(function() { - expect(push.handlers.error.length).toEqual(0); - expect(push.handlers.error.indexOf(eventHandler)).toEqual(-1); + expect(push._handlers.error.length).toEqual(0); + expect(push._handlers.error.indexOf(eventHandler)).toEqual(-1); done(); }); }); @@ -301,21 +301,21 @@ describe('phonegap-plugin-push', function () { eventHandler = function () { }; - expect(push.handlers.registration.length).toEqual(0); + expect(push._handlers.registration.length).toEqual(0); push.on('registration',eventHandler); - expect(push.handlers.registration.length).toEqual(1); - expect(push.handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1); + expect(push._handlers.registration.length).toEqual(1); + expect(push._handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1); execSpy.andCallFake(function (win, fail, service, id, args) { win(); }); push.unregister(function() { - expect(push.handlers.registration.length).toEqual(1); - expect(push.handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1); + expect(push._handlers.registration.length).toEqual(1); + expect(push._handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1); done(); - }, function() {}, ['foo', 'bar']); + }, null, ['foo', 'bar']); }); it('should not clear "notification" event handlers', function (done) { @@ -323,21 +323,21 @@ describe('phonegap-plugin-push', function () { eventHandler = function () { }; - expect(push.handlers.notification.length).toEqual(0); + expect(push._handlers.notification.length).toEqual(0); push.on('notification', eventHandler); - expect(push.handlers.notification.length).toEqual(1); - expect(push.handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1); + expect(push._handlers.notification.length).toEqual(1); + expect(push._handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1); execSpy.andCallFake(function (win, fail, service, id, args) { win(); }); push.unregister(function() { - expect(push.handlers.notification.length).toEqual(1); - expect(push.handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1); + expect(push._handlers.notification.length).toEqual(1); + expect(push._handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1); done(); - }, function() {}, ['foo', 'bar']); + }, null, ['foo', 'bar']); }); it('should not clear "error" event handlers', function (done) { @@ -345,21 +345,21 @@ describe('phonegap-plugin-push', function () { eventHandler = function () { }; - expect(push.handlers.error.length).toEqual(0); + expect(push._handlers.error.length).toEqual(0); push.on('error', eventHandler); - expect(push.handlers.error.length).toEqual(1); - expect(push.handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1); + expect(push._handlers.error.length).toEqual(1); + expect(push._handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1); execSpy.andCallFake(function (win, fail, service, id, args) { win(); }); push.unregister(function() { - expect(push.handlers.error.length).toEqual(1); - expect(push.handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1); + expect(push._handlers.error.length).toEqual(1); + expect(push._handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1); done(); - }, function() {}, ['foo', 'bar']); + }, null, ['foo', 'bar']); }); }); -- cgit v1.2.3-70-g09d2