-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6348 from NMDSdevopsServiceAdm/fix/1498-address-i…
…n-deletion-report Fix/1498 address in deletion report
- Loading branch information
Showing
5 changed files
with
65 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const expect = require('chai').expect; | ||
|
||
const concatenateAddress = require('../../../utils/concatenateAddress').concatenateAddress; | ||
|
||
describe('concatenateAddress', () => { | ||
it('should only return address line 1 when only line 1 passed in', () => { | ||
expect(concatenateAddress('Test Address Line 1')).to.equal('Test Address Line 1'); | ||
}); | ||
|
||
it('should concatenate all lines with spaces between when all provided', () => { | ||
expect(concatenateAddress('A', 'B', 'C', 'D', 'E')).to.equal('A B C D E'); | ||
}); | ||
|
||
it('should concatenate with single spaces between when address lines 2 and 3 are missing but town and county exist', () => { | ||
expect(concatenateAddress('A', undefined, undefined, 'D', 'E')).to.equal('A D E'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters