@@ -1099,6 +1099,159 @@ describe('Notification', function () {
10991099 } ) ;
11001100 } ) ;
11011101
1102+ describe ( 'input-push-channel' , function ( ) {
1103+ it ( 'defaults to undefined' , function ( ) {
1104+ expect ( compiledOutput ( ) ) . to . not . have . nested . property ( 'aps.input-push-channel' ) ;
1105+ } ) ;
1106+
1107+ it ( 'can be set to a string' , function ( ) {
1108+ note . inputPushChannel = 'the-input-push-channel' ;
1109+
1110+ expect ( compiledOutput ( ) ) . to . have . nested . property (
1111+ 'aps.input-push-channel' ,
1112+ 'the-input-push-channel'
1113+ ) ;
1114+ } ) ;
1115+
1116+ it ( 'can be set to undefined' , function ( ) {
1117+ note . inputPushChannel = 'input-push-channel' ;
1118+ note . inputPushChannel = undefined ;
1119+
1120+ expect ( compiledOutput ( ) ) . to . not . have . nested . property ( 'aps.input-push-channel' ) ;
1121+ } ) ;
1122+
1123+ describe ( 'setInputPushChannel' , function ( ) {
1124+ it ( 'is chainable' , function ( ) {
1125+ expect ( note . setInputPushChannel ( 'the-input-push-channel' ) ) . to . equal ( note ) ;
1126+ expect ( compiledOutput ( ) ) . to . have . nested . property (
1127+ 'aps.input-push-channel' ,
1128+ 'the-input-push-channel'
1129+ ) ;
1130+ } ) ;
1131+ } ) ;
1132+ } ) ;
1133+
1134+ describe ( 'input-push-token' , function ( ) {
1135+ it ( 'defaults to undefined' , function ( ) {
1136+ expect ( compiledOutput ( ) ) . to . not . have . nested . property ( 'aps.input-push-token' ) ;
1137+ } ) ;
1138+
1139+ it ( 'can be set to a number' , function ( ) {
1140+ note . inputPushToken = 1 ;
1141+
1142+ expect ( compiledOutput ( ) ) . to . have . nested . property ( 'aps.input-push-token' , 1 ) ;
1143+ } ) ;
1144+
1145+ it ( 'can be set to undefined' , function ( ) {
1146+ note . inputPushToken = 1 ;
1147+ note . inputPushToken = undefined ;
1148+
1149+ expect ( compiledOutput ( ) ) . to . not . have . nested . property ( 'aps.input-push-token' ) ;
1150+ } ) ;
1151+
1152+ describe ( 'setInputPushToken' , function ( ) {
1153+ it ( 'is chainable' , function ( ) {
1154+ expect ( note . setInputPushToken ( 1 ) ) . to . equal ( note ) ;
1155+ expect ( compiledOutput ( ) ) . to . have . nested . property ( 'aps.input-push-token' , 1 ) ;
1156+ } ) ;
1157+ } ) ;
1158+ } ) ;
1159+
1160+ describe ( 'filter-criteria' , function ( ) {
1161+ it ( 'defaults to undefined' , function ( ) {
1162+ expect ( compiledOutput ( ) ) . to . not . have . nested . property ( 'aps.filter-criteria' ) ;
1163+ } ) ;
1164+
1165+ it ( 'can be set to a string' , function ( ) {
1166+ note . filterCriteria = 'the-filter-criteria' ;
1167+
1168+ expect ( compiledOutput ( ) ) . to . have . nested . property (
1169+ 'aps.filter-criteria' ,
1170+ 'the-filter-criteria'
1171+ ) ;
1172+ } ) ;
1173+
1174+ it ( 'can be set to undefined' , function ( ) {
1175+ note . filterCriteria = 'filter-criteria' ;
1176+ note . filterCriteria = undefined ;
1177+
1178+ expect ( compiledOutput ( ) ) . to . not . have . nested . property ( 'aps.filter-criteria' ) ;
1179+ } ) ;
1180+
1181+ describe ( 'setFilterCriteria' , function ( ) {
1182+ it ( 'is chainable' , function ( ) {
1183+ expect ( note . setFilterCriteria ( 'the-filter-criteria' ) ) . to . equal ( note ) ;
1184+ expect ( compiledOutput ( ) ) . to . have . nested . property (
1185+ 'aps.filter-criteria' ,
1186+ 'the-filter-criteria'
1187+ ) ;
1188+ } ) ;
1189+ } ) ;
1190+ } ) ;
1191+
1192+ describe ( 'attributes-type' , function ( ) {
1193+ it ( 'defaults to undefined' , function ( ) {
1194+ expect ( compiledOutput ( ) ) . to . not . have . nested . property ( 'aps.attributes-type' ) ;
1195+ } ) ;
1196+
1197+ it ( 'can be set to a string' , function ( ) {
1198+ note . attributesType = 'the-attributes-type' ;
1199+
1200+ expect ( compiledOutput ( ) ) . to . have . nested . property (
1201+ 'aps.attributes-type' ,
1202+ 'the-attributes-type'
1203+ ) ;
1204+ } ) ;
1205+
1206+ it ( 'can be set to undefined' , function ( ) {
1207+ note . attributesType = 'attributes-type' ;
1208+ note . attributesType = undefined ;
1209+
1210+ expect ( compiledOutput ( ) ) . to . not . have . nested . property ( 'aps.attributes-type' ) ;
1211+ } ) ;
1212+
1213+ describe ( 'setAttributesType' , function ( ) {
1214+ it ( 'is chainable' , function ( ) {
1215+ expect ( note . setAttributesType ( 'the-attributes-type' ) ) . to . equal ( note ) ;
1216+ expect ( compiledOutput ( ) ) . to . have . nested . property (
1217+ 'aps.attributes-type' ,
1218+ 'the-attributes-type'
1219+ ) ;
1220+ } ) ;
1221+ } ) ;
1222+ } ) ;
1223+
1224+ describe ( 'attributes' , function ( ) {
1225+ const payload = { foo : 'bar' } ;
1226+ it ( 'defaults to undefined' , function ( ) {
1227+ expect ( compiledOutput ( ) ) . to . not . have . nested . property ( 'aps.attributes' ) ;
1228+ } ) ;
1229+
1230+ it ( 'can be set to a object' , function ( ) {
1231+ note . attributes = payload ;
1232+
1233+ expect ( compiledOutput ( ) )
1234+ . to . have . nested . property ( 'aps.attributes' )
1235+ . that . deep . equals ( payload ) ;
1236+ } ) ;
1237+
1238+ it ( 'can be set to undefined' , function ( ) {
1239+ note . attributes = payload ;
1240+ note . attributes = undefined ;
1241+
1242+ expect ( compiledOutput ( ) ) . to . not . have . nested . property ( 'aps.attributes' ) ;
1243+ } ) ;
1244+
1245+ describe ( 'setAttributes' , function ( ) {
1246+ it ( 'is chainable' , function ( ) {
1247+ expect ( note . setAttributes ( payload ) ) . to . equal ( note ) ;
1248+ expect ( compiledOutput ( ) )
1249+ . to . have . nested . property ( 'aps.attributes' )
1250+ . that . deep . equals ( payload ) ;
1251+ } ) ;
1252+ } ) ;
1253+ } ) ;
1254+
11021255 context ( 'when no aps properties are set' , function ( ) {
11031256 it ( 'is not present' , function ( ) {
11041257 expect ( compiledOutput ( ) . aps ) . to . be . undefined ;
0 commit comments