Skip to content

Commit

Permalink
Add administrative_area_iso2 field to international street.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Amundson committed Nov 8, 2024
1 parent 1d816e1 commit 75f6ecf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions international-street-api/candidate.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type (
Components struct {
SuperAdministrativeArea string `json:"super_administrative_area,omitempty"`
AdministrativeArea string `json:"administrative_area,omitempty"`
AdministrativeAreaISO2 string `json:"administrative_area_iso2,omitempty"`
AdministrativeAreaShort string `json:"administrative_area_short,omitempty"`
AdministrativeAreaLong string `json:"administrative_area_long,omitempty"`
SubAdministrativeArea string `json:"sub_administrative_area,omitempty"`
Expand Down
3 changes: 3 additions & 0 deletions international-street-api/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (f *ClientFixture) TestFullJSONResponseDeserialization() {
"components": {
"super_administrative_area": "super_blah",
"administrative_area": "SP",
"administrative_area_iso2": "BR-SP",
"administrative_area_short": "SP",
"administrative_area_long": "São Paulo",
"sub_administrative_area": "sub_blah",
Expand Down Expand Up @@ -185,6 +186,7 @@ func (f *ClientFixture) TestFullJSONResponseDeserialization() {
"components": {
"super_administrative_area": "blank",
"administrative_area": "Verified-NoChange",
"administrative_area_iso2": "Added",
"administrative_area_short": "blank",
"administrative_area_long": "blank",
"sub_administrative_area": "blank",
Expand Down Expand Up @@ -262,6 +264,7 @@ func (f *ClientFixture) TestFullJSONResponseDeserialization() {
f.So(candidate.Address12, should.Equal, "here")
f.So(component.SuperAdministrativeArea, should.Equal, "super_blah")
f.So(component.AdministrativeArea, should.Equal, "SP")
f.So(component.AdministrativeAreaISO2, should.Equal, "BR-SP")
f.So(component.AdministrativeAreaShort, should.Equal, "SP")
f.So(component.AdministrativeAreaLong, should.Equal, "São Paulo")
f.So(component.SubAdministrativeArea, should.Equal, "sub_blah")
Expand Down

0 comments on commit 75f6ecf

Please sign in to comment.