@@ -714,6 +714,14 @@ describe('SecurityTokenWrapper', () => {
714
714
checkpointId : 1 ,
715
715
} ;
716
716
717
+ const expectedCheckpointIdResult = new BigNumber ( 2 ) ;
718
+ // Mocked method
719
+ const mockedCheckpointIdMethod = mock ( MockedCallMethod ) ;
720
+ // Stub the method
721
+ when ( mockedContract . currentCheckpointId ) . thenReturn ( instance ( mockedCheckpointIdMethod ) ) ;
722
+ // Stub the request
723
+ when ( mockedCheckpointIdMethod . callAsync ( ) ) . thenResolve ( expectedCheckpointIdResult ) ;
724
+
717
725
const expectedDecimalsResult = new BigNumber ( 18 ) ;
718
726
const mockedDecimalsMethod = mock ( MockedCallMethod ) ;
719
727
when ( mockedContract . decimals ) . thenReturn ( instance ( mockedDecimalsMethod ) ) ;
@@ -737,6 +745,8 @@ describe('SecurityTokenWrapper', () => {
737
745
verify ( mockedMethod . callAsync ( objectContaining ( numberToBigNumber ( mockedParams . checkpointId ) ) ) ) . once ( ) ;
738
746
verify ( mockedContract . decimals ) . once ( ) ;
739
747
verify ( mockedDecimalsMethod . callAsync ( ) ) . once ( ) ;
748
+ verify ( mockedContract . currentCheckpointId ) . once ( ) ;
749
+ verify ( mockedCheckpointIdMethod . callAsync ( ) ) . once ( ) ;
740
750
} ) ;
741
751
} ) ;
742
752
@@ -750,6 +760,14 @@ describe('SecurityTokenWrapper', () => {
750
760
checkpointId : 1 ,
751
761
} ;
752
762
763
+ const expectedCheckpointIdResult = new BigNumber ( 2 ) ;
764
+ // Mocked method
765
+ const mockedCheckpointIdMethod = mock ( MockedCallMethod ) ;
766
+ // Stub the method
767
+ when ( mockedContract . currentCheckpointId ) . thenReturn ( instance ( mockedCheckpointIdMethod ) ) ;
768
+ // Stub the request
769
+ when ( mockedCheckpointIdMethod . callAsync ( ) ) . thenResolve ( expectedCheckpointIdResult ) ;
770
+
753
771
const expectedDecimalsResult = new BigNumber ( 18 ) ;
754
772
const mockedDecimalsMethod = mock ( MockedCallMethod ) ;
755
773
when ( mockedContract . decimals ) . thenReturn ( instance ( mockedDecimalsMethod ) ) ;
@@ -775,6 +793,8 @@ describe('SecurityTokenWrapper', () => {
775
793
) . once ( ) ;
776
794
verify ( mockedContract . decimals ) . once ( ) ;
777
795
verify ( mockedDecimalsMethod . callAsync ( ) ) . once ( ) ;
796
+ verify ( mockedContract . currentCheckpointId ) . once ( ) ;
797
+ verify ( mockedCheckpointIdMethod . callAsync ( ) ) . once ( ) ;
778
798
} ) ;
779
799
} ) ;
780
800
0 commit comments