|
@@ -21,4 +21,14 @@ class ProductListingTest < Test::Unit::TestCase
|
|
|
|
|
|
assert_equal 'Synergistic Silk Chair', product_listing.title
|
|
assert_equal 'Synergistic Silk Chair', product_listing.title
|
|
end
|
|
end
|
|
|
|
+
|
|
|
|
+ def test_get_product_listing_product_ids
|
|
|
|
+ fake "applications/999/product_listings/product_ids", method: :get, status: 201, body: load_fixture('product_listing_product_ids')
|
|
|
|
+
|
|
|
|
+ product_ids = ShopifyAPI::ProductListing.product_ids(params: { application_id: 999 })
|
|
|
|
+
|
|
|
|
+ assert_equal 2, product_ids.count
|
|
|
|
+ assert_equal 2, product_ids.first
|
|
|
|
+ assert_equal 1, product_ids.last
|
|
|
|
+ end
|
|
end
|
|
end
|