@@ -589,7 +589,7 @@ describe('The applicantRfiId Page', () => {
589
589
finalEligibleHouseholds : 4 ,
590
590
} ;
591
591
const mockFetchPromiseTemplateOne = Promise . resolve ( {
592
- ok : false ,
592
+ ok : true ,
593
593
status : 200 ,
594
594
json : ( ) => Promise . resolve ( { result : mockSuccessResponseTemplateOne } ) ,
595
595
} ) ;
@@ -599,7 +599,7 @@ describe('The applicantRfiId Page', () => {
599
599
totalProjectCosts : 101230 ,
600
600
} ;
601
601
const mockFetchPromiseTemplateTwo = Promise . resolve ( {
602
- ok : false ,
602
+ ok : true ,
603
603
status : 200 ,
604
604
json : ( ) => Promise . resolve ( { result : mockSuccessResponseTemplateTwo } ) ,
605
605
} ) ;
@@ -681,7 +681,7 @@ describe('The applicantRfiId Page', () => {
681
681
} ) ;
682
682
} ) ;
683
683
684
- expect ( global . fetch ) . toHaveBeenCalledTimes ( 5 ) ;
684
+ expect ( global . fetch ) . toHaveBeenCalledTimes ( 3 ) ;
685
685
expect ( global . fetch ) . toHaveBeenCalledWith (
686
686
'/api/applicant/template?templateNumber=1' ,
687
687
{ body : expect . any ( FormData ) , method : 'POST' }
@@ -702,7 +702,7 @@ describe('The applicantRfiId Page', () => {
702
702
} ) ;
703
703
704
704
pageTestingHelper . expectMutationToBeCalled (
705
- 'updateRfiAndCreateTemplateNineDataMutation ' ,
705
+ 'updateFormRfiAndCreateTemplateNineDataMutation ' ,
706
706
{
707
707
rfiInput : {
708
708
jsonData : {
@@ -773,6 +773,21 @@ describe('The applicantRfiId Page', () => {
773
773
} ,
774
774
_errors : [ ] ,
775
775
} ,
776
+ formInput : {
777
+ applicationRowId : 1 ,
778
+ jsonData : {
779
+ benefits : {
780
+ householdsImpactedIndigenous : 60 ,
781
+ numberOfHouseholds : 4 ,
782
+ } ,
783
+ budgetDetails : {
784
+ totalEligibleCosts : 92455 ,
785
+ totalProjectCost : 101230 ,
786
+ } ,
787
+ } ,
788
+ reasonForChange : 'Auto updated from upload for RFI: CCBC-01001-01' ,
789
+ formSchemaId : 'test' ,
790
+ } ,
776
791
}
777
792
) ;
778
793
} ) ;
0 commit comments