File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,8 @@ chai.should();
1212
1313// demo data which might be returned by the `SalesforceService.query`
1414const billingAccountData = {
15- sfBillingAccountId : '123' ,
1615 tcBillingAccountId : 123123 ,
17- name : 'Billing Account 1' ,
18- startDate : '2021-02-10T18:51:27Z' ,
19- endDate : '2021-03-10T18:51:27Z' ,
16+ markup : '12' ,
2017} ;
2118
2219describe ( 'Project Billing Accounts list' , ( ) => {
Original file line number Diff line number Diff line change @@ -96,7 +96,11 @@ class SalesforceService {
9696 logger . debug ( _ . get ( res , 'data.records' , [ ] ) ) ;
9797 }
9898 const billingAccounts = _ . get ( res , 'data.records' , [ ] ) . map ( o => ( {
99- tcBillingAccountId : _ . get ( o , 'TopCoder_Billing_Account_Id__c' ) ,
99+ tcBillingAccountId : util . parseIntStrictly (
100+ _ . get ( o , 'TopCoder_Billing_Account_Id__c' ) ,
101+ 10 ,
102+ null , // fallback to null if cannot parse
103+ ) ,
100104 markup : _ . get ( o , 'Mark_Up__c' ) ,
101105 } ) ) ;
102106 return billingAccounts . length > 0 ? billingAccounts [ 0 ] : { } ;
You can’t perform that action at this time.
0 commit comments