@@ -172,12 +172,8 @@ describe('PushController', () => {
172
172
send : function ( body , installations ) {
173
173
var badge = body . data . badge ;
174
174
installations . forEach ( ( installation ) => {
175
- if ( installation . deviceType == "ios" ) {
176
- expect ( installation . badge ) . toEqual ( badge ) ;
177
- expect ( installation . originalBadge + 1 ) . toEqual ( installation . badge ) ;
178
- } else {
179
- expect ( installation . badge ) . toBeUndefined ( ) ;
180
- }
175
+ expect ( installation . badge ) . toEqual ( badge ) ;
176
+ expect ( installation . originalBadge + 1 ) . toEqual ( installation . badge ) ;
181
177
} )
182
178
return successfulTransmissions ( body , installations ) ;
183
179
} ,
@@ -203,7 +199,9 @@ describe('PushController', () => {
203
199
while ( installations . length != 15 ) {
204
200
const installation = new Parse . Object ( "_Installation" ) ;
205
201
installation . set ( "installationId" , "installation_" + installations . length ) ;
206
- installation . set ( "deviceToken" , "device_token_" + installations . length )
202
+ installation . set ( "deviceToken" , "device_token_" + installations . length ) ;
203
+ installation . set ( "badge" , installations . length ) ;
204
+ installation . set ( "originalBadge" , installations . length ) ;
207
205
installation . set ( "deviceType" , "android" ) ;
208
206
installations . push ( installation ) ;
209
207
}
@@ -238,12 +236,7 @@ describe('PushController', () => {
238
236
expect ( results . length ) . toBe ( 15 ) ;
239
237
for ( var i = 0 ; i < 15 ; i ++ ) {
240
238
const installation = results [ i ] ;
241
- if ( installation . get ( 'deviceType' ) == 'ios' ) {
242
- expect ( installation . get ( 'badge' ) ) . toBe ( parseInt ( installation . get ( 'originalBadge' ) ) + 1 ) ;
243
- } else {
244
- expect ( installation . get ( 'badge' ) ) . toBe ( undefined ) ;
245
- expect ( installation . get ( 'originalBadge' ) ) . toBe ( undefined ) ;
246
- }
239
+ expect ( installation . get ( 'badge' ) ) . toBe ( parseInt ( installation . get ( 'originalBadge' ) ) + 1 ) ;
247
240
}
248
241
done ( )
249
242
} ) . catch ( ( err ) => {
0 commit comments