diff --git a/src/BrazeKit-dev.js b/src/BrazeKit-dev.js index b4b0eb4..7631162 100644 --- a/src/BrazeKit-dev.js +++ b/src/BrazeKit-dev.js @@ -129,6 +129,8 @@ var constructor = function () { quantity, eventAttributes ); + + return reportEvent === true; } function logPurchaseEventPerProduct(event) { diff --git a/test/tests.js b/test/tests.js index 2098679..5b598e6 100644 --- a/test/tests.js +++ b/test/tests.js @@ -1832,6 +1832,11 @@ user.getUserIdentities is not a function,\n`; var purchaseEventProperties = window.braze.purchaseEventProperties[0]; purchaseEventProperties.should.eql(expectedPurchaseEvent); + + reportService.event.should.have.property( + 'EventName', + 'eCommerce - Purchase' + ); }); it('should call changeUser and openSession on init with userIdentificationType MPID passed in forwarding settings', function() {