Skip to content

Commit

Permalink
Add spec for detailed_spots
Browse files Browse the repository at this point in the history
  • Loading branch information
Gahee Heo committed Feb 7, 2017
1 parent 3b5cff3 commit 47c921a
Show file tree
Hide file tree
Showing 13 changed files with 3,898 additions and 10,006 deletions.
13 changes: 10 additions & 3 deletions spec/google_places/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,20 @@

context 'List detailed spots', vcr: { cassette_name: 'list_spots_with_detail' } do
it 'should request detailed_spots' do
lat, lng = '-33.8670522', '151.1957362'
place_id = "ChIJfeDYPyB_54gR0Ft0OAcS7fo"
lat, lng = '28.3852377', '-81.566068'
@client = GooglePlaces::Client.new(api_key)

spots = @client.detailed_spots(lat, lng)
expect(spots).to_not be_nil
expect(spots.length).to eq 20

for spot in spots
expect(spot.address_components).not_to be_nil
expect(spot.city).not_to be_nil
expect(spot.country).not_to be_nil
expect(spot.formatted_address).not_to be_nil
expect(spot.region).not_to be_nil
expect(spot.url).not_to be_nil
end
end
end
end
16 changes: 8 additions & 8 deletions spec/vcr_cassettes/list_predictions.yml

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

Loading

0 comments on commit 47c921a

Please sign in to comment.