diff --git a/__tests__/requests/insee.spec.js b/__tests__/requests/insee.spec.js index 151995745b13e970102b743870076a92fc7e05ca..ce5f6e3090fd085dfd8aefe3c4d9a809b442ece1 100644 --- a/__tests__/requests/insee.spec.js +++ b/__tests__/requests/insee.spec.js @@ -42,6 +42,18 @@ describe('getInseeCode', () => { expect(await getInseeCode(38080, "L'isle d'abeau")).toEqual('38193') }) + it('should return insee code for: Ervauville', async () => { + expect(await getInseeCode('45320', 'Ervauville')).toEqual('45136') + }) + + it('should return insee code for: Marcy l’Etoile', async () => { + expect(await getInseeCode('69280', 'Marcy l’Etoile')).toEqual('69127') + }) + + it('should return insee code for: Brignais', async () => { + expect(await getInseeCode('69530', 'Brignais')).toEqual('69027') + }) + describe('should handle communes with "Saint" or "St"', () => { it("should return insee code for: Saint Romain au Mont d'Or", async () => { expect(await getInseeCode(69270, "Saint Romain au Mont d'Or")).toEqual( @@ -85,6 +97,11 @@ describe('getInseeCode', () => { it('should return insee code for: castets', async () => { expect(await getInseeCode(40260, 'castets')).toEqual('40075') }) + it('should return insee code for: Fontaines st Martin', async () => { + expect(await getInseeCode(69270, 'Fontaines st Martin')).toEqual( + '69087' + ) + }) it('should return insee code for: St léger', async () => { expect(await getInseeCode('06260', 'St léger')).toEqual('06124') })