File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -856,7 +856,7 @@ var constructor = function () {
856856 options . sessionTimeoutInSeconds =
857857 forwarderSettings . ABKSessionTimeoutKey || 1800 ;
858858 options . sdkFlavor = 'mparticle' ;
859- options . enableHtmlInAppMessages =
859+ options . allowUserSuppliedJavascript =
860860 forwarderSettings . enableHtmlInAppMessages == 'True' ;
861861 options . doNotLoadFontAwesome =
862862 forwarderSettings . doNotLoadFontAwesome == 'True' ;
Original file line number Diff line number Diff line change @@ -1086,10 +1086,9 @@ describe('Braze Forwarder', function() {
10861086 window . braze . getUser ( ) . emailSet . should . equal ( 'test2@gmail.com' ) ;
10871087
10881088 // We support $Age as a reserved attribute for Braze. However, since
1089- // Braze's API expects a year from us, this test will break every year,
1090- // since setting the age = 10 in 2021 will mean the user is born in 2011,
1091- // but setting it in 2023 means the year is 2013.
1092- window . braze . getUser ( ) . yearOfBirth . should . equal ( 2014 ) ;
1089+ // Braze's API expects a year, so we calculate expected year dynamically.
1090+ var expectedYearOfBirth = new Date ( ) . getFullYear ( ) - 10 ;
1091+ window . braze . getUser ( ) . yearOfBirth . should . equal ( expectedYearOfBirth ) ;
10931092 window . braze . getUser ( ) . dayOfBirth . should . equal ( 1 ) ;
10941093 window . braze . getUser ( ) . monthOfBirth . should . equal ( 1 ) ;
10951094 window . braze . getUser ( ) . phoneSet . should . equal ( '1234567890' ) ;
You can’t perform that action at this time.
0 commit comments