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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5c32db3a8fba2888edbfa3b6556c18e5a3ee092d
|
4
|
+
data.tar.gz: c9842e495658571d957a0d7061a6d69687b9e92e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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.
|
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:
|
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.
|
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.
|
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
|
-
|
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.
|