spree_api 2.3.3 → 2.3.4

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: 5752a91942e0ac29588a3ebb480984ae1e8a4833
4
- data.tar.gz: f7a88ac18005ccce8cb89b0e95201174e39404e0
3
+ metadata.gz: 67164eec95e8c7df0bd09088a07ccf352031bcf5
4
+ data.tar.gz: fd296233701f4684bde99697a8e009b107e6d2e2
5
5
  SHA512:
6
- metadata.gz: fe932da355fa5f4289aef12236e5054ea5489152e82d0e9bf1c22d8343c1d96891da9d132477fd6eece63df8f019f5656eeca7e49a825bb5046563a7fe85773a
7
- data.tar.gz: 3e6d70b9faa3d422a88f7b30aadc53bffebfc9754121c39cab70ade338e6c81adb3641c00b4fb5fcea70e329db558f20c5e4f2a1f7a4d836648688ac4cdd0798
6
+ metadata.gz: e6a47aa15c09115f6b8aeb8677c5bc3cac9dd035ac799cd2b3454102b8ec5f2dcaf1a9deadad156dd7ee33168a0e88154e6f7f816af87e5831d5790f4fd12c62
7
+ data.tar.gz: 01f1be77baf5bd64995358b732ef6003e20cedf4d951fc799a51505bb3d1fe42a5503f2cdb64c457e666e9a1cf69f82d0f3f646d83cc2ad4e6fa653b52cded7f
@@ -67,7 +67,7 @@ module Spree
67
67
 
68
68
  def find_order
69
69
  @order = Spree::Order.find_by(number: order_id)
70
- authorize! :read, @order
70
+ authorize! :read, @order, order_token
71
71
  end
72
72
 
73
73
  def find_payment
@@ -180,7 +180,7 @@ module Spree
180
180
  Order.should_receive(:create!).and_return(order = Spree::Order.new)
181
181
  order.stub(:associate_user!)
182
182
  order.stub_chain(:contents, :add).and_return(line_item = double('LineItem'))
183
- line_item.should_receive(:update_attributes).with("special" => true)
183
+ line_item.should_receive(:update_attributes!).with("special" => true)
184
184
 
185
185
  controller.stub(permitted_line_item_attributes: [:id, :variant_id, :quantity, :special])
186
186
  api_post :create, :order => {
@@ -64,6 +64,11 @@ module Spree
64
64
  api_get :index, :order_id => order.to_param
65
65
  assert_unauthorized!
66
66
  end
67
+
68
+ it "can view the payments for an order given the order token" do
69
+ api_get :index, :order_id => order.to_param, :order_token => order.guest_token
70
+ json_response["payments"].first.should have_attributes(attributes)
71
+ end
67
72
  end
68
73
  end
69
74
 
@@ -55,7 +55,7 @@ module Spree
55
55
  it 'cannot list of stock items' do
56
56
  api_get :index, stock_location_id: stock_location.to_param
57
57
  json_response['stock_items'].first.should have_attributes(attributes)
58
- json_response['stock_items'].first['variant']['sku'].should include 'ABC'
58
+ json_response['stock_items'].first['variant']['sku'].should include 'SKU'
59
59
  end
60
60
 
61
61
  it 'requires a stock_location_id to be passed as a parameter' do
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.3.3
4
+ version: 2.3.4
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-09-19 00:00:00.000000000 Z
11
+ date: 2014-10-07 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.3.3
19
+ version: 2.3.4
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.3.3
26
+ version: 2.3.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rabl
29
29
  requirement: !ruby/object:Gem::Requirement