File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -704,7 +704,7 @@ var constructor = function () {
704704 options . sessionTimeoutInSeconds =
705705 forwarderSettings . ABKSessionTimeoutKey || 1800 ;
706706 options . sdkFlavor = 'mparticle' ;
707- options . enableHtmlInAppMessages =
707+ options . allowUserSuppliedJavascript =
708708 forwarderSettings . enableHtmlInAppMessages == 'True' ;
709709 options . doNotLoadFontAwesome =
710710 forwarderSettings . doNotLoadFontAwesome == 'True' ;
Original file line number Diff line number Diff line change @@ -993,10 +993,9 @@ describe('Appboy Forwarder', function () {
993993 window . appboy . getUser ( ) . emailSet . should . equal ( 'test2@gmail.com' ) ;
994994
995995 // We support $Age as a reserved attribute for Braze. However, since
996- // Braze's API expects a year from us, this test will break every year,
997- // since setting the age = 10 in 2021 will mean the user is born in 2011,
998- // but setting it in 2023 means the year is 2013.
999- window . appboy . getUser ( ) . yearOfBirth . should . equal ( 2013 ) ;
996+ // Braze's API expects a year, so we calculate expected year dynamically.
997+ var expectedYearOfBirth = new Date ( ) . getFullYear ( ) - 10 ;
998+ window . appboy . getUser ( ) . yearOfBirth . should . equal ( expectedYearOfBirth ) ;
1000999 window . appboy . getUser ( ) . dayOfBirth . should . equal ( 1 ) ;
10011000 window . appboy . getUser ( ) . monthOfBirth . should . equal ( 1 ) ;
10021001 window . appboy . getUser ( ) . phoneSet . should . equal ( '1234567890' ) ;
You can’t perform that action at this time.
0 commit comments