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', () => {
160160 //Mock request data
161161 let data = {
162162 'alert' : 'alert' ,
163+ 'title' : 'title' ,
163164 'badge' : 100 ,
164165 'sound' : 'test' ,
165166 'content-available' : 1 ,
@@ -173,7 +174,7 @@ describe('APNS', () => {
173174
174175 let notification = APNS . _generateNotification ( data , { expirationTime : expirationTime , collapseId : collapseId } ) ;
175176
176- expect ( notification . aps . alert ) . toEqual ( data . alert ) ;
177+ expect ( notification . aps . alert ) . toEqual ( { body : ' alert' , title : 'title' } ) ;
177178 expect ( notification . aps . badge ) . toEqual ( data . badge ) ;
178179 expect ( notification . aps . sound ) . toEqual ( data . sound ) ;
179180 expect ( notification . aps [ 'content-available' ] ) . toEqual ( 1 ) ;
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export class APNS {
178178 notification . setAlert ( coreData . alert ) ;
179179 break ;
180180 case 'title' :
181- notification . setAlertTitle ( coreData . title ) ;
181+ notification . setTitle ( coreData . title ) ;
182182 break ;
183183 case 'badge' :
184184 notification . setBadge ( coreData . badge ) ;
You can’t perform that action at this time.
0 commit comments