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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fda09b369307c4509d6d6581ad4aaafe7b926d07
4
- data.tar.gz: 6cad03a8dd918b6fa93c4a50cfb5c84d83663bfb
3
+ metadata.gz: ba95ac1b99044d7f579a367a10672e82a13efc3b
4
+ data.tar.gz: 24f6ecc33a216a0751a5985bb51f52a8de04a0a3
5
5
  SHA512:
6
- metadata.gz: 9a16807219ecdad98881d86671f3694574553ff202fc1cb979fe44b429be11a49459d0e52cf2b0cc51ba1608235975c6718d0d14050ae463d013df75815bd91f
7
- data.tar.gz: 5afbdf7144d7e61ca450949ad3a7fae54cddd9f231a39b817365925502542d555057a6009fa7abb1da24ef2668a38b27aeef615c56ce12356ed0bb11e1436609
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
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- "3.1.4"
3
+ "3.1.5"
4
4
  end
5
5
  end
@@ -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
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-03-14 00:00:00.000000000 Z
11
+ date: 2017-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant