Skip to content

Commit

Permalink
fix southwest gas remove zipcode from address
Browse files Browse the repository at this point in the history
  • Loading branch information
andobolocco committed Jun 23, 2020
1 parent 7487129 commit 2815850
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/documentProcessor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ it('Expect SOUTHWESTGAS bill to be detected and processed', async () => {
expect(response.documentType).toBe('Southwest Gas');
expect(response.extracted.first_name).toBe('CHARLES');
expect(response.extracted.last_name).toBe('DOE');
expect(response.extracted.street_address_line_1).toBe('2561 W ARCADIA LN 85310');
expect(response.extracted.street_address_line_1).toBe('2561 W ARCADIA LN');
expect(response.extracted.street_address_line_2).toBe('');
expect(response.extracted.city).toBe('PHOENIX');
expect(response.extracted.state).toBe('AZ');
Expand Down
2 changes: 2 additions & 0 deletions lib/documentTypes/southwestGasBill.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ module.exports = {
street_address_line_1 = rawText[lineWithCityStateZipCodeIndex - 1];
}

street_address_line_1 = street_address_line_1.split(' ').slice(0, -1).join(' ');

const street_address_line_2 = '';

// city, state, zip code
Expand Down

0 comments on commit 2815850

Please sign in to comment.