@@ -64,6 +64,17 @@ describe('Action AuthMobile Unit Tests', () => {
6464 } ) ;
6565 } ) ;
6666
67+ describe ( 'initResetPinNew()' , ( ) => {
68+ it ( 'should init values and navigate' , ( ) => {
69+ store . auth . resetPinCurrent = '123456' ;
70+ auth . initResetPinNew ( ) ;
71+ expect ( store . auth . resetPinCurrent , 'to equal' , '123456' ) ;
72+ expect ( store . auth . resetPinNew , 'to equal' , '' ) ;
73+ expect ( store . auth . resetPinVerify , 'to equal' , '' ) ;
74+ expect ( nav . goResetPasswordNew , 'was called once' ) ;
75+ } ) ;
76+ } ) ;
77+
6778 describe ( 'pushPinDigit()' , ( ) => {
6879 it ( 'should add a digit for empty pin' , ( ) => {
6980 auth . pushPinDigit ( { digit : '1' , param : 'pin' } ) ;
@@ -104,6 +115,11 @@ describe('Action AuthMobile Unit Tests', () => {
104115 } ) ;
105116
106117 describe ( 'popPinDigit()' , ( ) => {
118+ beforeEach ( ( ) => {
119+ sandbox . stub ( auth , 'initResetPinNew' ) ;
120+ sandbox . stub ( auth , 'initResetPin' ) ;
121+ } ) ;
122+
107123 it ( 'should remove digit from a pin' , ( ) => {
108124 store . auth . pin = '000000' ;
109125 auth . popPinDigit ( { param : 'pin' } ) ;
@@ -131,13 +147,13 @@ describe('Action AuthMobile Unit Tests', () => {
131147 it ( 'should go from ResetPinConfirmed to ResetPinNew on empty string' , ( ) => {
132148 store . auth . resetPinVerify = '' ;
133149 auth . popPinDigit ( { param : 'resetPinVerify' } ) ;
134- expect ( nav . goResetPasswordNew , 'was called once' ) ;
150+ expect ( auth . initResetPinNew , 'was called once' ) ;
135151 } ) ;
136152
137153 it ( 'should go from ResetPinNew to ResetPinCurrent on empty string' , ( ) => {
138154 store . auth . resetPinNew = '' ;
139155 auth . popPinDigit ( { param : 'resetPinNew' } ) ;
140- expect ( nav . goResetPasswordCurrent , 'was called once' ) ;
156+ expect ( auth . initResetPin , 'was called once' ) ;
141157 } ) ;
142158 } ) ;
143159
0 commit comments