Skip to content

Commit

Permalink
Merge pull request #955 from transitland/switch-to-iso-3166
Browse files Browse the repository at this point in the history
Switch to iso 3166
  • Loading branch information
drewda committed Mar 3, 2017
2 parents db2b260 + d91dd44 commit fcdde07
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions db/sample-changesets/actransit.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"name": "Alameda-Contra Costa Transit District",
"shortName": "AC Transit",
"identifiedBy": ["usntd://9014"],
"country": "United States",
"state": "California",
"country": "US",
"state": "US-CA",
"metro": "San Francisco Bay Area",
"timezone": "America/Los_Angeles",
"website": "http://www.actransit.org/",
Expand Down
4 changes: 2 additions & 2 deletions db/sample-changesets/bart.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"identifiedBy": [
"usntd://9003"
],
"country": "United States",
"state": "California",
"country": "US",
"state": "US-CA",
"metro": "San Francisco Bay Area",
"timezone": "America/Los_Angeles",
"website": "http://www.bart.gov/",
Expand Down
4 changes: 2 additions & 2 deletions db/sample-changesets/caltrain.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"onestopId": "o-9q9-caltrain",
"name": "Caltrain",
"identifiedBy": ["usntd://9134"],
"country": "United States",
"state": "California",
"country": "US",
"state": "US-CA",
"metro": "San Francisco Bay Area",
"timezone": "America/Los_Angeles",
"website": "http://www.caltrain.com/",
Expand Down
4 changes: 2 additions & 2 deletions db/sample-changesets/nycdotsiferry.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"name": "New York City Department of Transportation",
"shortName": "NYC DOT",
"identifiedBy": ["usntd://2082"],
"country": "United States",
"state": "New York",
"country": "US",
"state": "US-NY",
"metro": "New York City",
"timezone": "America/New_York",
"website": "http://nyc.gov/dot",
Expand Down
4 changes: 2 additions & 2 deletions db/sample-changesets/nyct.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"name": "MTA New York City Transit",
"shortName": "NYCT",
"identifiedBy": ["usntd://2008"],
"country": "United States",
"state": "New York",
"country": "US",
"state": "US-NY",
"metro": "New York City",
"timezone": "America/New_York",
"website": "http://web.mta.info/",
Expand Down
4 changes: 2 additions & 2 deletions db/sample-changesets/path.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"name": "Port Authority Trans-Hudson",
"shortName": "PATH",
"identifiedBy": ["usntd://2075"],
"country": "United States",
"state": "New York",
"country": "US",
"state": "US-NY",
"metro": "New York City",
"timezone": "America/New_York",
"website": "http://www.panynj.gov/",
Expand Down
4 changes: 2 additions & 2 deletions db/sample-changesets/samtrans.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"name": "San Mateo County Transit District",
"shortName": "Samtrans",
"identifiedBy": ["usntd://9009"],
"country": "United States",
"state": "California",
"country": "US",
"state": "US-CA",
"metro": "San Francisco Bay Area",
"timezone": "America/Los_Angeles",
"website": "http://www.samtrans.com/",
Expand Down
4 changes: 2 additions & 2 deletions db/sample-changesets/sfmta.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"name": "San Francisco Municipal Transportation Agency",
"shortName": "SFMTA",
"identifiedBy": ["usntd://9015"],
"country": "United States",
"state": "California",
"country": "US",
"state": "US-CA",
"metro": "San Francisco Bay Area",
"timezone": "America/Los_Angeles",
"website": "http://www.sfmta.com/",
Expand Down
4 changes: 2 additions & 2 deletions db/sample-changesets/vta.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"name": "Santa Clara Valley Transportation Authority",
"shortName": "VTA",
"identifiedBy": ["usntd://9013"],
"country": "United States",
"state": "California",
"country": "US",
"state": "US-CA",
"metro": "San Francisco Bay Area",
"timezone": "America/Los_Angeles",
"website": "http://www.vta.org/",
Expand Down
10 changes: 5 additions & 5 deletions spec/controllers/api/v1/operators_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,19 @@
describe 'GET aggregate' do
before(:each) do
Rails.cache.clear
create(:operator, country: 'United States', state: 'California', metro: 'San Francisco Bay Area', timezone: 'America/Los_Angeles')
create(:operator, country: 'United States', state: 'California', metro: 'San Francisco Bay Area', timezone: 'America/Los_Angeles')
create(:operator, country: 'United States', state: 'California', metro: 'Los Angeles', timezone: 'America/Los_Angeles')
create(:operator, country: 'US', state: 'US-CA', metro: 'San Francisco Bay Area', timezone: 'America/Los_Angeles')
create(:operator, country: 'US', state: 'US-CA', metro: 'San Francisco Bay Area', timezone: 'America/Los_Angeles')
create(:operator, country: 'US', state: 'US-CA', metro: 'Los Angeles', timezone: 'America/Los_Angeles')
end

it 'returns a list of all countries with counts for each' do
get :aggregate
expect_json('country.United States.count', 3)
expect_json('country.US.count', 3)
end

it 'returns a list of all states with counts for each' do
get :aggregate
expect_json('state.California.count', 3)
expect_json('state.US-CA.count', 3)
end

it 'returns a list of all metros with counts for each' do
Expand Down

0 comments on commit fcdde07

Please sign in to comment.