spree_api 2.2.5 → 2.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc3a1a431b9b8d9c5d32ba386030f0d55ea3554d
4
- data.tar.gz: 4264b2c93575c1336f335afeceb46d5f16b5a60a
3
+ metadata.gz: deb1a6d97cb271dd9cc4a2d1fd18b06e1a9436ab
4
+ data.tar.gz: e9f35894fba49ecb7ab11db26ddb751db7faccbc
5
5
  SHA512:
6
- metadata.gz: 58a12d74ec252e62aee0b65f79e66584057f05b65ffb72f85beb3792b7262477fff435eaf767047f04fe496c255d9ecf0430adf2ef532be961311e234cb863f2
7
- data.tar.gz: 579e9bca1dd148464a67e49c1fbd50ae53138170b31a9e948071390094289863d0701cf47bbea56387f49edcccb9453752294ba3427a79ed25ec4c7e667afd19
6
+ metadata.gz: cf795c05d74934c7df5d03a7075fc231959d80f1127041cfc8ae8d44fcf647844aedc6a2aac364fa37f355990336adcf0d3a7215a2df7919973eef1802d8b42b
7
+ data.tar.gz: d159dd97e4c2ac33940f0760ba119a832db3006888e5c86c75a431ab7ad74d6fa3d7ee45a1bd639b7ccac479eca96780ec9688e9cbea6841212e156ca513e9d8
@@ -79,8 +79,8 @@ describe Spree::Api::BaseController do
79
79
  'name' => 'test order' }
80
80
 
81
81
  mapped = subject.map_nested_attributes_keys(klass, attributes)
82
- mapped.has_key?('line_items_attributes').should be_true
83
- mapped.has_key?('name').should be_true
82
+ mapped.has_key?('line_items_attributes').should be true
83
+ mapped.has_key?('name').should be true
84
84
  end
85
85
 
86
86
  it "lets a subclass override the product associations that are eager-loaded" do
@@ -93,7 +93,7 @@ module Spree
93
93
  end
94
94
 
95
95
  it "will return an error if the order cannot transition" do
96
- pending "not sure if this test is valid"
96
+ skip "not sure if this test is valid"
97
97
  order.bill_address = nil
98
98
  order.save
99
99
  order.update_column(:state, "address")
@@ -136,7 +136,7 @@ module Spree
136
136
  # Find the correct shipping rate for that shipment...
137
137
  json_shipping_rate = json_shipment['shipping_rates'].detect { |sr| sr["id"] == shipping_rate.id }
138
138
  # ... And finally ensure that it's selected
139
- json_shipping_rate['selected'].should be_true
139
+ json_shipping_rate['selected'].should be true
140
140
  # Order should automatically transfer to payment because all criteria are met
141
141
  json_response['state'].should == 'payment'
142
142
  end
@@ -226,7 +226,7 @@ module Spree
226
226
  end
227
227
 
228
228
  it "can apply a coupon code to an order" do
229
- pending "ensure that the order totals are properly updated, see frontend orders_controller or checkout_controller as example"
229
+ skip "ensure that the order totals are properly updated, see frontend orders_controller or checkout_controller as example"
230
230
 
231
231
  order.update_column(:state, "payment")
232
232
  PromotionHandler::Coupon.should_receive(:new).with(order).and_call_original
@@ -453,7 +453,7 @@ module Spree
453
453
  shipping_rate = shipment["shipping_rates"][0]
454
454
  shipping_rate["name"].should == json_shipping_method["name"]
455
455
  shipping_rate["cost"].should == "10.0"
456
- shipping_rate["selected"].should be_true
456
+ shipping_rate["selected"].should be true
457
457
  shipping_rate["display_cost"].should == "$10.00"
458
458
 
459
459
  shipment["stock_location_name"].should_not be_blank
@@ -478,7 +478,9 @@ module Spree
478
478
 
479
479
  it "responds with orders updated_at with miliseconds precision" do
480
480
  if ActiveRecord::Base.connection.adapter_name == "Mysql2"
481
- pending "MySQL does not support millisecond timestamps."
481
+ skip "MySQL does not support millisecond timestamps."
482
+ else
483
+ skip "Probable need to make it call as_json. See https://github.com/rails/rails/commit/0f33d70e89991711ff8b3dde134a61f4a5a0ec06"
482
484
  end
483
485
 
484
486
  api_get :index
@@ -144,7 +144,7 @@ module Spree
144
144
  end
145
145
 
146
146
  it "does not raise a stack level error" do
147
- pending "Investigate why a payment.reload after the request raises 'stack level too deep'"
147
+ skip "Investigate why a payment.reload after the request raises 'stack level too deep'"
148
148
  payment.reload.state.should == "failed"
149
149
  end
150
150
  end
@@ -10,7 +10,7 @@ module Spree::Api
10
10
 
11
11
  context "with an available promotion" do
12
12
  let!(:order) { create(:order_with_line_items, :line_items_count => 1) }
13
- let!(:promotion) do
13
+ let!(:promotion) do
14
14
  promotion = Spree::Promotion.create(name: "10% off", code: "10off")
15
15
  calculator = Spree::Calculator::FlatPercentItemTotal.create(preferred_flat_percent: "10")
16
16
  action = Spree::Promotion::Actions::CreateItemAdjustments.create(calculator: calculator)
@@ -25,7 +25,7 @@ module Spree::Api
25
25
  order.reload.total.should == 109.00
26
26
  json_response["success"].should == "The coupon code was successfully applied to your order."
27
27
  json_response["error"].should be_blank
28
- json_response["successful"].should be_true
28
+ json_response["successful"].should be true
29
29
  end
30
30
 
31
31
  context "with an expired promotion" do
@@ -40,7 +40,7 @@ module Spree::Api
40
40
  response.status.should == 422
41
41
  json_response["success"].should be_blank
42
42
  json_response["error"].should == "The coupon code is expired"
43
- json_response["successful"].should be_false
43
+ json_response["successful"].should be false
44
44
  end
45
45
  end
46
46
  end
@@ -47,7 +47,7 @@ module Spree
47
47
  children = json_response['root']['taxons']
48
48
  children.count.should eq 1
49
49
  children.first['name'].should eq taxon.name
50
- children.first.key?('taxons').should be_false
50
+ children.first.key?('taxons').should be false
51
51
  end
52
52
 
53
53
  it "gets a single taxonomy with set=nested" do
@@ -56,7 +56,7 @@ module Spree
56
56
  json_response['name'].should eq taxonomy.name
57
57
 
58
58
  children = json_response['root']['taxons']
59
- children.first.key?('taxons').should be_true
59
+ children.first.key?('taxons').should be true
60
60
  end
61
61
 
62
62
  it "gets the jstree-friendly version of a taxonomy" do
@@ -18,13 +18,13 @@ describe "Rabl Cache", :caching => true do
18
18
  !v['is_master']
19
19
  end.first
20
20
 
21
- variant_a['is_master'].should be_false
21
+ variant_a['is_master'].should be false
22
22
  variant_a['stock_items'].should_not be_nil
23
23
 
24
24
  get "/api/products/#{Spree::Product.first.id}", :token => user.spree_api_key
25
25
  response.status.should == 200
26
26
  variant_b = JSON.parse(response.body)['variants'].last
27
- variant_b['is_master'].should be_false
27
+ variant_b['is_master'].should be false
28
28
 
29
29
  variant_a['id'].should == variant_b['id']
30
30
  variant_b['stock_items'].should be_nil
data/spec/spec_helper.rb CHANGED
@@ -39,6 +39,7 @@ require 'spree/api/testing_support/setup'
39
39
  RSpec.configure do |config|
40
40
  config.backtrace_exclusion_patterns = [/gems\/activesupport/, /gems\/actionpack/, /gems\/rspec/]
41
41
  config.color = true
42
+ config.infer_spec_type_from_file_location!
42
43
 
43
44
  config.include FactoryGirl::Syntax::Methods
44
45
  config.include Spree::Api::TestingSupport::Helpers, :type => :controller
@@ -23,5 +23,5 @@ module ControllerHacks
23
23
  end
24
24
 
25
25
  RSpec.configure do |config|
26
- config.include ControllerHacks, :type => :controller
26
+ config.include ControllerHacks, type: :controller
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Bigg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-29 00:00:00.000000000 Z
11
+ date: 2014-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.5
19
+ version: 2.2.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.5
26
+ version: 2.2.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rabl
29
29
  requirement: !ruby/object:Gem::Requirement