test/access/location_test.rb in access-2.0.48 vs test/access/location_test.rb in access-2.0.49
- old
+ new
@@ -1,17 +1,17 @@
require './test/test_helper'
class LocationTest < Minitest::Test
def get_first_location
- VCR.use_cassette('location search') do
+ VCR.use_cassette('location/search_first') do
@first_location = Access::Location.search(member_key: 'API_RUBY_GEM_TEST', per_page: 1).locations.first
end
end
def test_locations_search
- VCR.use_cassette('location search') do
+ VCR.use_cassette('location/search') do
locations_response = Access::Location.search(member_key: 'API_RUBY_GEM_TEST', per_page: 1)
assert locations_response.success
first_location = locations_response.locations.first
assert_kind_of Access::LocationResponse, locations_response
assert_kind_of Access::Link, locations_response.links
@@ -31,11 +31,11 @@
end
end
def test_locations_find
get_first_location
- VCR.use_cassette('location find') do
+ VCR.use_cassette('location/find') do
locations_response = Access::Location.find(@first_location.location_key, member_key: 'API_RUBY_GEM_TEST')
assert locations_response.success
first_location = locations_response.locations.first
assert_kind_of Access::LocationResponse, locations_response
assert_kind_of Access::Location, first_location
@@ -45,10 +45,10 @@
assert_kind_of Access::Geolocation, first_location.physical_location.geolocation
end
end
def test_locations_fail_member_key
- VCR.use_cassette('location search fail member key') do
+ VCR.use_cassette('location/search_fail_member_key') do
locations_response = Access::Location.search(query: 'pizza')
refute locations_response.success
assert_kind_of Access::LocationResponse, locations_response
assert_kind_of Access::Error, locations_response.error
assert_equal 401, locations_response.error.status_code