This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,13 @@ describe('Action Nav Unit Tests', () => {
116116 } ) ;
117117 } ) ;
118118
119+ describe ( 'goPayLightningSupplyAmount()' , ( ) => {
120+ it ( 'should set correct route' , ( ) => {
121+ nav . goPayLightningSupplyAmount ( ) ;
122+ expect ( store . route , 'to equal' , 'PayLightningSupplyAmount' ) ;
123+ } ) ;
124+ } ) ;
125+
119126 describe ( 'goPayLightningConfirm()' , ( ) => {
120127 it ( 'should set correct route' , ( ) => {
121128 nav . goPayLightningConfirm ( ) ;
Original file line number Diff line number Diff line change @@ -302,6 +302,14 @@ describe('Action Payments Unit Tests', () => {
302302 expect ( payment . decodeInvoice , 'was not called' ) ;
303303 } ) ;
304304
305+ it ( 'should detect zero amount payment' , async ( ) => {
306+ store . payment . address = 'some-address' ;
307+ store . payment . amount = '0' ;
308+ payment . decodeInvoice . resolves ( true ) ;
309+ await payment . checkType ( ) ;
310+ expect ( nav . goPayLightningSupplyAmount , 'was called once' ) ;
311+ } ) ;
312+
305313 it ( 'should decode successfully' , async ( ) => {
306314 store . payment . address = 'some-address' ;
307315 payment . decodeInvoice . resolves ( true ) ;
You can’t perform that action at this time.
0 commit comments