Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BrazeKit-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ var constructor = function () {
options.sessionTimeoutInSeconds =
forwarderSettings.ABKSessionTimeoutKey || 1800;
options.sdkFlavor = 'mparticle';
options.enableHtmlInAppMessages =
options.allowUserSuppliedJavascript =
forwarderSettings.enableHtmlInAppMessages == 'True';
options.doNotLoadFontAwesome =
forwarderSettings.doNotLoadFontAwesome == 'True';
Expand Down
7 changes: 3 additions & 4 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1086,10 +1086,9 @@ describe('Braze Forwarder', function() {
window.braze.getUser().emailSet.should.equal('test2@gmail.com');

// We support $Age as a reserved attribute for Braze. However, since
// Braze's API expects a year from us, this test will break every year,
// since setting the age = 10 in 2021 will mean the user is born in 2011,
// but setting it in 2023 means the year is 2013.
window.braze.getUser().yearOfBirth.should.equal(2014);
// Braze's API expects a year, so we calculate expected year dynamically.
var expectedYearOfBirth = new Date().getFullYear() - 10;
window.braze.getUser().yearOfBirth.should.equal(expectedYearOfBirth);
window.braze.getUser().dayOfBirth.should.equal(1);
window.braze.getUser().monthOfBirth.should.equal(1);
window.braze.getUser().phoneSet.should.equal('1234567890');
Expand Down