solidus_api 2.6.6 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_api might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 9741fc5bb0924a11bf93392c6f9deb5bb235c0a78d35af9dc44dd2f923aed8f3
4
- data.tar.gz: 9944709bd687240bc6610ce6ffd2f927a75747297811d2963df66b455c720d81
2
+ SHA1:
3
+ metadata.gz: 5c32db3a8fba2888edbfa3b6556c18e5a3ee092d
4
+ data.tar.gz: c9842e495658571d957a0d7061a6d69687b9e92e
5
5
  SHA512:
6
- metadata.gz: 28e12e65d9f76aad71955a8f93b5acd00f64bb8a354ee4dc4de939ff319880cd8c45d06e3c47b94dbaeced49548b1391604123da8ddc5199f47f74e2ce075641
7
- data.tar.gz: 6ea83c506e3b9ac0382ec41b0046dafbd6a1b55b59a67e3e8e269c961cdbb20c58097e5236d7989fc6a75a40914115d2c5a83b2965722f23cbd9dd25438d61f6
6
+ metadata.gz: 99b3556ea4c02666bae471c693b0c839f4caeb4407bdb150c01068dff955e523a4c21754d5ec09c11d6176b321bae8a2369fbced0ef4544d09aea3b6b7ca62c4
7
+ data.tar.gz: d4a04cdd205266284b1ba5b09398837ccd6f6549806209208fc2687c64840fb56510f41ad4f511152336943873451a8f88688e4f368989001a5c88d41efdebe0
@@ -329,8 +329,7 @@ module Spree
329
329
  it "returns the order if the order is already complete" do
330
330
  order.update_columns(completed_at: Time.current, state: 'complete')
331
331
  put spree.api_checkout_path(order.to_param), params: { order_token: order.guest_token }
332
- expect(json_response['number']).to eq(order.number)
333
- expect(response.status).to eq(200)
332
+ assert_unauthorized!
334
333
  end
335
334
 
336
335
  # Regression test for https://github.com/spree/spree/issues/3784
@@ -52,6 +52,27 @@ module Spree
52
52
  allow_any_instance_of(Order).to receive_messages user: current_api_user
53
53
  end
54
54
 
55
+ context "dealing with a completed order" do
56
+ let!(:order) { create(:completed_order_with_totals) }
57
+
58
+ it "can't add a new line item" do
59
+ post spree.api_order_line_items_path(order), params: { line_item: { variant_id: product.master.to_param, quantity: 1 } }
60
+ assert_unauthorized!
61
+ end
62
+
63
+ it "can't update a line item" do
64
+ line_item = order.line_items.first
65
+ put spree.api_order_line_item_path(order, line_item), params: { line_item: { quantity: 10 } }
66
+ assert_unauthorized!
67
+ end
68
+
69
+ it "can't delete a line item" do
70
+ line_item = order.line_items.first
71
+ delete spree.api_order_line_item_path(order, line_item)
72
+ assert_unauthorized!
73
+ end
74
+ end
75
+
55
76
  it "can add a new line item to an existing order" do
56
77
  post spree.api_order_line_items_path(order), params: { line_item: { variant_id: product.master.to_param, quantity: 1 } }
57
78
  expect(response.status).to eq(201)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.6
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-23 00:00:00.000000000 Z
11
+ date: 2018-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jbuilder
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 2.6.6
61
+ version: 2.7.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 2.6.6
68
+ version: 2.7.0
69
69
  description: REST API for the Solidus e-commerce framework.
70
70
  email: contact@solidus.io
71
71
  executables: []
@@ -307,7 +307,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
307
307
  - !ruby/object:Gem::Version
308
308
  version: 1.8.23
309
309
  requirements: []
310
- rubygems_version: 3.0.6
310
+ rubyforge_project:
311
+ rubygems_version: 2.6.10
311
312
  signing_key:
312
313
  specification_version: 4
313
314
  summary: REST API for the Solidus e-commerce framework.