File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ describe('APNS', () => {
160
160
//Mock request data
161
161
let data = {
162
162
'alert' : 'alert' ,
163
+ 'title' : 'title' ,
163
164
'badge' : 100 ,
164
165
'sound' : 'test' ,
165
166
'content-available' : 1 ,
@@ -173,7 +174,7 @@ describe('APNS', () => {
173
174
174
175
let notification = APNS . _generateNotification ( data , { expirationTime : expirationTime , collapseId : collapseId } ) ;
175
176
176
- expect ( notification . aps . alert ) . toEqual ( data . alert ) ;
177
+ expect ( notification . aps . alert ) . toEqual ( { body : ' alert' , title : 'title' } ) ;
177
178
expect ( notification . aps . badge ) . toEqual ( data . badge ) ;
178
179
expect ( notification . aps . sound ) . toEqual ( data . sound ) ;
179
180
expect ( notification . aps [ 'content-available' ] ) . toEqual ( 1 ) ;
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export class APNS {
178
178
notification . setAlert ( coreData . alert ) ;
179
179
break ;
180
180
case 'title' :
181
- notification . setAlertTitle ( coreData . title ) ;
181
+ notification . setTitle ( coreData . title ) ;
182
182
break ;
183
183
case 'badge' :
184
184
notification . setBadge ( coreData . badge ) ;
You can’t perform that action at this time.
0 commit comments