summaryrefslogtreecommitdiff
path: root/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js
diff options
context:
space:
mode:
authorAnike Arni <aarni@thoughtworks.com>2017-03-28 13:51:56 -0300
committerAnike Arni <aarni@thoughtworks.com>2017-03-28 15:23:47 -0300
commitd133b2876e49bdb285c8e8f1bdf64502d8bf9a02 (patch)
tree19b0142ab4b11f3b9c26ebef61a4b9a6f23f7924 /web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js
parenta6c848f373e4842c29c602ec7071d9b964587095 (diff)
[#932] Adds new password form
Diffstat (limited to 'web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js')
-rw-r--r--web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js b/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js
index c950e305..a20d3b7b 100644
--- a/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js
+++ b/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js
@@ -5,11 +5,13 @@ import { UserRecoveryCodeForm } from 'src/account_recovery/forms/user_recovery_c
describe('UserRecoveryCodeForm', () => {
let userRecoveryCodeForm;
+ let mockNext;
beforeEach(() => {
const mockTranslations = key => key;
+ mockNext = expect.createSpy();
userRecoveryCodeForm = shallow(
- <UserRecoveryCodeForm t={mockTranslations} />
+ <UserRecoveryCodeForm t={mockTranslations} next={mockNext} />
);
});
@@ -28,4 +30,9 @@ describe('UserRecoveryCodeForm', () => {
it('renders submit button', () => {
expect(userRecoveryCodeForm.find('SubmitButton').props().buttonText).toEqual('account-recovery.user-form.button');
});
+
+ it('submits form to next step', () => {
+ userRecoveryCodeForm.find('form').simulate('submit');
+ expect(mockNext).toHaveBeenCalled();
+ });
});