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();
12
12
13
13
// demo data which might be returned by the `SalesforceService.query`
14
14
const billingAccountData = {
15
- sfBillingAccountId : '123' ,
16
15
tcBillingAccountId : 123123 ,
17
- name : 'Billing Account 1' ,
18
- startDate : '2021-02-10T18:51:27Z' ,
19
- endDate : '2021-03-10T18:51:27Z' ,
16
+ markup : '12' ,
20
17
} ;
21
18
22
19
describe ( 'Project Billing Accounts list' , ( ) => {
Original file line number Diff line number Diff line change @@ -96,7 +96,11 @@ class SalesforceService {
96
96
logger . debug ( _ . get ( res , 'data.records' , [ ] ) ) ;
97
97
}
98
98
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
+ ) ,
100
104
markup : _ . get ( o , 'Mark_Up__c' ) ,
101
105
} ) ) ;
102
106
return billingAccounts . length > 0 ? billingAccounts [ 0 ] : { } ;
You can’t perform that action at this time.
0 commit comments