Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 2726911

Browse files
committed
Add missing unit test for auth.pushPinDigit() on resetPinVerify param
1 parent d4c5e72 commit 2726911

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/unit/action/auth-mobile.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ describe('Action AuthMobile Unit Tests', () => {
7676
});
7777

7878
describe('pushPinDigit()', () => {
79+
beforeEach(() => {
80+
sandbox.stub(auth, 'checkResetPin');
81+
});
82+
7983
it('should add a digit for empty pin', () => {
8084
auth.pushPinDigit({ digit: '1', param: 'pin' });
8185
expect(store.auth.pin, 'to equal', '1');
@@ -112,6 +116,12 @@ describe('Action AuthMobile Unit Tests', () => {
112116
auth.pushPinDigit({ digit: '1', param: 'resetPinNew' });
113117
expect(nav.goResetPasswordConfirm, 'was called once');
114118
});
119+
120+
it('should call auth.checkResetPin if done with resetPinVerify', () => {
121+
store.auth.resetPinVerify = '00000';
122+
auth.pushPinDigit({ digit: '1', param: 'resetPinVerify' });
123+
expect(auth.checkResetPin, 'was called once');
124+
});
115125
});
116126

117127
describe('popPinDigit()', () => {

0 commit comments

Comments
 (0)