File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ var constructor = function () {
460460 options . sessionTimeoutInSeconds =
461461 forwarderSettings . ABKSessionTimeoutKey || 1800 ;
462462 options . sdkFlavor = 'mparticle' ;
463- options . enableHtmlInAppMessages =
463+ options . allowUserSuppliedJavascript =
464464 forwarderSettings . enableHtmlInAppMessages == 'True' ;
465465 options . doNotLoadFontAwesome =
466466 forwarderSettings . doNotLoadFontAwesome == 'True' ;
Original file line number Diff line number Diff line change @@ -936,10 +936,9 @@ describe('Appboy Forwarder', function () {
936936 window . appboy . getUser ( ) . emailSet . should . equal ( 'test2@gmail.com' ) ;
937937
938938 // We support $Age as a reserved attribute for Braze. However, since
939- // Braze's API expects a year from us, this test will break every year,
940- // since setting the age = 10 in 2021 will mean the user is born in 2011,
941- // but setting it in 2023 means the year is 2013.
942- window . appboy . getUser ( ) . yearOfBirth . should . equal ( 2013 ) ;
939+ // Braze's API expects a year, so we calculate expected year dynamically.
940+ var expectedYearOfBirth = new Date ( ) . getFullYear ( ) - 10 ;
941+ window . appboy . getUser ( ) . yearOfBirth . should . equal ( expectedYearOfBirth ) ;
943942 window . appboy . getUser ( ) . dayOfBirth . should . equal ( 1 ) ;
944943 window . appboy . getUser ( ) . monthOfBirth . should . equal ( 1 ) ;
945944 window . appboy . getUser ( ) . phoneSet . should . equal ( '1234567890' ) ;
You can’t perform that action at this time.
0 commit comments