Skip to content

Commit 7ad6ae8

Browse files
committed
MAGETWO-63460: Braintree saved credit card error for reorder between $2001-$3000 does not display error to customer
1 parent b4a082a commit 7ad6ae8

File tree

1 file changed

+5
-6
lines changed
  • dev/tests/js/jasmine/tests/app/code/Magento/Braintree/frontend/js/view/payment/method-renderer

1 file changed

+5
-6
lines changed

dev/tests/js/jasmine/tests/app/code/Magento/Braintree/frontend/js/view/payment/method-renderer/cc-form.test.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
2+
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
55

@@ -41,9 +41,7 @@ define([
4141
}
4242
};
4343
injector.mock(mocks);
44-
injector.require(
45-
['Magento_Braintree/js/view/payment/method-renderer/cc-form'],
46-
function (Constr) {
44+
injector.require(['Magento_Braintree/js/view/payment/method-renderer/cc-form'], function (Constr) {
4745
braintreeCcForm = new Constr({
4846
provider: 'provName',
4947
name: 'test',
@@ -55,14 +53,15 @@ define([
5553
});
5654

5755
it('Check if payment code and message container are restored after onActiveChange call.', function () {
58-
var expectedMessageContainer = braintreeCcForm.messageContainer;
56+
var expectedMessageContainer = braintreeCcForm.messageContainer,
57+
expectedCode = braintreeCcForm.code;
5958

6059
braintreeCcForm.code = 'braintree-vault';
6160
braintreeCcForm.messageContainer = new Messages();
6261

6362
braintreeCcForm.onActiveChange(true);
6463

65-
expect(braintreeCcForm.getCode()).toEqual('braintree');
64+
expect(braintreeCcForm.getCode()).toEqual(expectedCode);
6665
expect(braintreeCcForm.messageContainer).toEqual(expectedMessageContainer);
6766
});
6867
});

0 commit comments

Comments
 (0)