Skip to content

Commit

Permalink
Merge pull request #87 from qpowell/update-vcr
Browse files Browse the repository at this point in the history
Re-record the VCR cassettes to ensure the API wrapper is still correct
  • Loading branch information
edwinwills committed Oct 10, 2016
2 parents cba7c82 + 73658b3 commit 1a0fe17
Show file tree
Hide file tree
Showing 12 changed files with 9,866 additions and 15 deletions.
2 changes: 1 addition & 1 deletion spec/api_key.travis.rb
@@ -1 +1 @@
RSPEC_API_KEY = 'AIzaSyATGBjcfrRXQtNEMMyt8Fw7tSGEY8PQwv0'
RSPEC_API_KEY = 'AIzaSyAKeN0XMV5LqJmqBrZZ1K8qMipFW7-Eybg'
8 changes: 4 additions & 4 deletions spec/google_places/spot_spec.rb
Expand Up @@ -104,22 +104,22 @@
context 'Multiple page request', vcr: { cassette_name: 'multiple_page_request' } do

it 'should return >20 results when :multipage_request is true' do
@collection = GooglePlaces::Spot.list_by_query('wolfgang', api_key, :lat => '40.808235', :lng => '-73.948733', :radius => @radius, :multipage => true)
@collection = GooglePlaces::Spot.list_by_query('coffee', api_key, :lat => '40.808235', :lng => '-73.948733', :radius => @radius, :multipage => true)
expect(@collection.size).to be >= 21
end

it 'should return at most 20 results when :multipage is false' do
@collection = GooglePlaces::Spot.list_by_query('wolfgang', api_key, :lat => '40.808235', :lng => '-73.948733', :radius => @radius, :multipage => false)
@collection = GooglePlaces::Spot.list_by_query('coffee', api_key, :lat => '40.808235', :lng => '-73.948733', :radius => @radius, :multipage => false)
expect(@collection.size).to be <= 20
end

it 'should return at most 20 results when :multipage is not present' do
@collection = GooglePlaces::Spot.list_by_query('wolfgang', api_key, :lat => '40.808235', :lng => '-73.948733', :radius => @radius)
@collection = GooglePlaces::Spot.list_by_query('coffee', api_key, :lat => '40.808235', :lng => '-73.948733', :radius => @radius)
expect(@collection.size).to be <= 20
end

it 'should return a pagetoken when there is more than 20 results and :multipage is false' do
@collection = GooglePlaces::Spot.list_by_query('wolfgang', api_key, :lat => '40.808235', :lng => '-73.948733', :radius => @radius, :multipage => false)
@collection = GooglePlaces::Spot.list_by_query('coffee', api_key, :lat => '40.808235', :lng => '-73.948733', :radius => @radius, :multipage => false)
expect(@collection.last.nextpagetoken).to_not be_nil
end

Expand Down
209 changes: 208 additions & 1 deletion spec/vcr_cassettes/list_predictions.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1a0fe17

Please sign in to comment.