Skip to content

Commit

Permalink
update a spec to use ISO-3166 geographies
Browse files Browse the repository at this point in the history
  • Loading branch information
drewda committed Feb 8, 2017
1 parent 94f7992 commit d91dd44
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit d91dd44

Please sign in to comment.