Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to iso 3166 #955

Merged
merged 2 commits into from
Mar 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -145,19 +145,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