From d133b2876e49bdb285c8e8f1bdf64502d8bf9a02 Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Tue, 28 Mar 2017 13:51:56 -0300 Subject: [#932] Adds new password form --- .../src/account_recovery/forms/user_recovery_code_form.spec.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js') 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( - + ); }); @@ -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(); + }); }); -- cgit v1.2.3