test/access/favorite_test.rb in access-2.0.17 vs test/access/favorite_test.rb in access-2.0.18
- old
+ new
@@ -155,27 +155,30 @@
assert_kind_of Access::FavoriteResponse, request
assert_kind_of Array, request.favorites
assert_equal 1, request.favorites.map(&:favoriteType).uniq.count
assert_equal 'offer', request.favorites.map(&:favoriteType).uniq.first
assert_kind_of Access::Favorite, request.favorites.first
+ assert_kind_of Access::Offer, request.favorites.first.offer unless request.favorites.first.offer.nil? # This test will go once the favorites api is pulling from elasticsearch
end
def assert_good_favorite_location_response(request)
assert request.success
assert_kind_of Access::FavoriteResponse, request
assert_kind_of Array, request.favorites
assert_equal 1, request.favorites.map(&:favoriteType).uniq.count
assert_equal 'location', request.favorites.map(&:favoriteType).uniq.first
assert_kind_of Access::Favorite, request.favorites.first
+ assert_kind_of Access::Location, request.favorites.first.location
end
def assert_good_favorite_store_response(request)
assert request.success
assert_kind_of Access::FavoriteResponse, request
assert_kind_of Array, request.favorites
assert_equal 1, request.favorites.map(&:favoriteType).uniq.count
assert_equal 'store', request.favorites.map(&:favoriteType).uniq.first
assert_kind_of Access::Favorite, request.favorites.first
+ assert_kind_of Access::Store, request.favorites.first.store
end
end