File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
com.unity.mobile.notifications/Tests/Runtime/iOS Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -388,4 +388,26 @@ public void iOSNotification_CalendarTrigger_ReturnsSameKindDateTime()
388
388
Assert . AreEqual ( trigger2 . Minute , retTrigger . Minute ) ;
389
389
Assert . AreEqual ( trigger2 . UtcTime , retTrigger . UtcTime ) ;
390
390
}
391
+
392
+ [ Test ]
393
+ public void iOSNotificationCalendarTrigger_HandlesMissingUtcField ( )
394
+ {
395
+ var original = new iOSNotificationCalendarTrigger ( )
396
+ {
397
+ Day = 5 ,
398
+ } ;
399
+
400
+ var notification = new iOSNotification ( )
401
+ {
402
+ Trigger = original ,
403
+ } ;
404
+
405
+ // clear UserInfo, where UTC flag is stored
406
+ notification . UserInfo . Clear ( ) ;
407
+
408
+ Assert . AreEqual ( iOSNotificationTriggerType . Calendar , notification . Trigger . Type ) ;
409
+ var result = ( iOSNotificationCalendarTrigger ) notification . Trigger ;
410
+ Assert . AreEqual ( 5 , result . Day ) ;
411
+ Assert . IsFalse ( result . UtcTime ) ;
412
+ }
391
413
}
You can’t perform that action at this time.
0 commit comments