spree_core 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spree/order_updater.rb +1 -0
- data/lib/spree/core/version.rb +1 -1
- data/spec/models/spree/order_updater_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a071ed6b4cc78a430668eb9126e734b5f268a929
|
4
|
+
data.tar.gz: 64835149d6f71828d9985052f7c87f1e564cb842
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c9b53163dbfe2e5e86682967ff0e2b567696a45c7805370b6e64cb106dfea702e7d48a5cb26be8838a8373b08c40352d00d559626a626951a785578c9979b53
|
7
|
+
data.tar.gz: 5eca3c03a5d281769f2d78ea9fc2974a15715658f24840c0d384e0d949775409c22fde5d189ffe694ab5888385c581fc2428dde258fc278b5fd143bd54df4081
|
@@ -15,6 +15,7 @@ module Spree
|
|
15
15
|
# object with callbacks (otherwise you will end up in an infinite recursion as the
|
16
16
|
# associations try to save and then in turn try to call +update!+ again.)
|
17
17
|
def update
|
18
|
+
update_item_count
|
18
19
|
update_totals
|
19
20
|
if order.completed?
|
20
21
|
update_payment_state
|
data/lib/spree/core/version.rb
CHANGED
@@ -67,6 +67,17 @@ module Spree
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
describe "#update_with_updater!" do
|
71
|
+
it "updates item count" do
|
72
|
+
create(:line_item, order: order)
|
73
|
+
create(:line_item, order: order)
|
74
|
+
|
75
|
+
order.update_with_updater!
|
76
|
+
|
77
|
+
expect(order.item_count).to eq(2)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
70
81
|
context "updating shipment state" do
|
71
82
|
before do
|
72
83
|
allow(order).to receive_messages backordered?: false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|