spree_core 3.1.4 → 3.1.5
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: ba95ac1b99044d7f579a367a10672e82a13efc3b
|
4
|
+
data.tar.gz: 24f6ecc33a216a0751a5985bb51f52a8de04a0a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b62b3e3298c5698d54b1231edfba99e1d7a6a3619ec5080f9e7a3efea36c148b4c15953e798d37b14236c1636323e6cb315a1892f2085bf7413f0b82bb611d09
|
7
|
+
data.tar.gz: 3063bc05fdb6418d3b1091cbbef5624696ae587fb423d66c26bcbcc0db59e32c8619758c52c3840be0919717ed35d116e0825bd7a7d47c555b561ac296fd46b2
|
@@ -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.1.
|
4
|
+
version: 3.1.5
|
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
|