Skip to content

Commit 6bbaa66

Browse files
Merge pull request #105 from fredashiii/master
Add administrative_area_iso2 to international-street.
2 parents c8924e9 + 2673f17 commit 6bbaa66

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/international_street/Candidate.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Candidate {
2525
this.components.countryIso3 = responseData.components.country_iso_3;
2626
this.components.superAdministrativeArea = responseData.components.super_administrative_area;
2727
this.components.administrativeArea = responseData.components.administrative_area;
28+
this.components.administrativeAreaIso2 = responseData.components.administrative_area_iso2;
2829
this.components.administrativeAreaShort = responseData.components.administrative_area_short;
2930
this.components.administrativeAreaLong = responseData.components.administrative_area_long;
3031
this.components.subAdministrativeArea = responseData.components.sub_administrative_area;
@@ -101,6 +102,7 @@ class Candidate {
101102
this.analysis.changes.components.countryIso3 = responseData.analysis.changes.components.country_iso_3;
102103
this.analysis.changes.components.superAdministrativeArea = responseData.analysis.changes.components.super_administrative_area;
103104
this.analysis.changes.components.administrativeArea = responseData.analysis.changes.components.administrative_area;
105+
this.analysis.changes.components.administrativeAreaIso2 = responseData.analysis.changes.components.administrative_area_iso2;
104106
this.analysis.changes.components.administrativeAreaShort = responseData.analysis.changes.components.administrative_area_short;
105107
this.analysis.changes.components.administrativeAreaLong = responseData.analysis.changes.components.administrative_area_long;
106108
this.analysis.changes.components.subAdministrativeArea = responseData.analysis.changes.components.sub_administrative_area;

tests/international_street/test_Candidate.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ describe("An International match candidate", function () {
2222
country_iso_3: "14",
2323
super_administrative_area: "15",
2424
administrative_area: "16",
25-
administrative_area_short: "16.1",
26-
administrative_area_long: "16.2",
25+
administrative_area_iso2: "16.1",
26+
administrative_area_short: "16.2",
27+
administrative_area_long: "16.3",
2728
sub_administrative_area: "17",
2829
dependent_locality: "18",
2930
dependent_locality_name: "19",
@@ -156,8 +157,9 @@ describe("An International match candidate", function () {
156157
expect(components.countryIso3).to.equal("14");
157158
expect(components.superAdministrativeArea).to.equal("15");
158159
expect(components.administrativeArea).to.equal("16");
159-
expect(components.administrativeAreaShort).to.equal("16.1");
160-
expect(components.administrativeAreaLong).to.equal("16.2");
160+
expect(components.administrativeAreaIso2).to.equal("16.1");
161+
expect(components.administrativeAreaShort).to.equal("16.2");
162+
expect(components.administrativeAreaLong).to.equal("16.3");
161163
expect(components.subAdministrativeArea).to.equal("17");
162164
expect(components.dependentLocality).to.equal("18");
163165
expect(components.dependentLocalityName).to.equal("19");

0 commit comments

Comments
 (0)