mad_cart 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,7 +37,26 @@ describe MadCart::Store::Etsy do
37
37
  first_product.name.should_not be_nil
38
38
  first_product.description.should_not be_nil
39
39
  first_product.image_url.should_not be_nil
40
- first_product.additional_attributes['price'].should == BigDecimal.new('6.00')
40
+ puts first_product.image_url
41
+ first_product.additional_attributes['price'].should == BigDecimal.new('2.5')
42
+ end
43
+ end
44
+
45
+ context "new format image api" do
46
+ it "returns products" do
47
+ VCR.use_cassette('etsy_store_listings_new_format_image') do
48
+ api = MadCart::Store::Etsy.new(:store_name => 'TheBeadsofDreams')
49
+ products = api.products(:includes => "MainImage")
50
+ products.size.should == 25 # the etsy product limit
51
+
52
+ first_product = products.first
53
+
54
+ first_product.should be_a(MadCart::Model::Product)
55
+ first_product.name.should_not be_nil
56
+ first_product.description.should_not be_nil
57
+ first_product.image_url.should_not be_nil
58
+ first_product.additional_attributes['price'].should == BigDecimal.new('2.2')
59
+ end
41
60
  end
42
61
  end
43
62
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mad_cart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Heiligers
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-07-27 00:00:00.000000000 Z
13
+ date: 2017-03-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
@@ -234,6 +234,7 @@ files:
234
234
  - spec/fixtures/vcr_cassettes/big_commerce_time.yml
235
235
  - spec/fixtures/vcr_cassettes/etsy_store_does_not_exist.yml
236
236
  - spec/fixtures/vcr_cassettes/etsy_store_listings.yml
237
+ - spec/fixtures/vcr_cassettes/etsy_store_listings_new_format_image.yml
237
238
  - spec/fixtures/vcr_cassettes/o_auth_big_commerce_store.yml
238
239
  - spec/fixtures/vcr_cassettes/spree.yml
239
240
  - spec/fixtures/vcr_cassettes/spree_alternative.yml
@@ -270,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
271
  version: '0'
271
272
  requirements: []
272
273
  rubyforge_project:
273
- rubygems_version: 2.4.5
274
+ rubygems_version: 2.5.1
274
275
  signing_key:
275
276
  specification_version: 4
276
277
  summary: Allows communication with various e-commerce merchants such as BigCommerce
@@ -288,6 +289,7 @@ test_files:
288
289
  - spec/fixtures/vcr_cassettes/big_commerce_time.yml
289
290
  - spec/fixtures/vcr_cassettes/etsy_store_does_not_exist.yml
290
291
  - spec/fixtures/vcr_cassettes/etsy_store_listings.yml
292
+ - spec/fixtures/vcr_cassettes/etsy_store_listings_new_format_image.yml
291
293
  - spec/fixtures/vcr_cassettes/o_auth_big_commerce_store.yml
292
294
  - spec/fixtures/vcr_cassettes/spree.yml
293
295
  - spec/fixtures/vcr_cassettes/spree_alternative.yml