Sha256: 492cfe48e21570c763fe8ff92bf43b67df01c409d5260d0008adb91a058127e9

Contents?: true

Size: 1.06 KB

Versions: 5

Compression:

Stored size: 1.06 KB

Contents

require 'test_helper'

# rake test TEST=test/ad_product_test.rb
class AdProductTest < BaseTest
  def test_list
    vcr do
      catalog = FacebookAds::AdProductCatalog.find_by(name: 'Test')
      products = catalog.ad_products
      product = products.first
      assert_equal '1489112071104048', product.id
      assert_equal 'retro-ruby-earrings', product.retailer_id
      assert_equal 'Precious Retro .925 Sterling Silver Artificial Ruby Earrings', product.name
      assert_equal '$5 shipping - at your doorstep within 25-27 business days.', product.description
      assert_equal 'Adoration-Precious', product.brand
      assert_equal 'Jewelry | Earrings', product.category
      assert_equal 'USD', product.currency
      assert_equal '$156.00', product.price
      assert_equal 'https://external.xx.fbcdn.net/safe_image.php?d=AQALnOfu1mhkpb4T&url=https%3A%2F%2Fd38eepresuu519.cloudfront.net%2F12c85243d743ac3cb21b71c34192b252%2Flarge.jpg&cfs=1&_nc_hash=AQBlxlDCq59tO6sE', product.image_url
      assert_equal 'https://tophatter.com/lots/23275728', product.url
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
facebook_ads-0.1.11 test/ad_product_test.rb
facebook_ads-0.1.10 test/ad_product_test.rb
facebook_ads-0.1.9 test/ad_product_test.rb
facebook_ads-0.1.8 test/ad_product_test.rb
facebook_ads-0.1.7 test/ad_product_test.rb