spree_repeat_order 2.2.1 → 2.2.2

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: 529ebf90d5bc56d96e6b0089ee17cbb12bb33065
4
- data.tar.gz: 3e6abee2f0bbd092639039138f19093ad1c0ce85
3
+ metadata.gz: 63708b30f505264d46e163482025f16c36ea90af
4
+ data.tar.gz: 325d9cef913dfcfa8762c0cb012e26451ab2d5a2
5
5
  SHA512:
6
- metadata.gz: 0a85a234026e72393e1485749f5b0dde345c146dc7270f527f8637b1a897b327ce133cf785c18746414d39721d1aec644e5c6e2cdb77c9ed0004f6fdd7aed0bb
7
- data.tar.gz: 2d6b96ca37556bff40066539f1945a36988ef9ad89483391452625ddada464c1144f6d98ccb10ab85bd24f6e37f9ba9332697c0ea8419144853d1564dc19ce0f
6
+ metadata.gz: 6feda6a1a4be367b6d90b8846776b02a3edde6d82f6962fb4fcc1b8b25912bf989af52c20150d705d8915e462c05de4e3adbda2271edfc9ce969363b2ae87388
7
+ data.tar.gz: 2fd752b462e400cc9ca5ebf91c66c058de0404b62404bf4d8297c1e4fbd5321988a980f948a8b115662b04df6342fbab044c10ac47d52870124c73d0eb4e01da
@@ -14,6 +14,8 @@ module Spree
14
14
  end
15
15
 
16
16
  new_order.line_items = new_line_items
17
+ new_order.update_totals
18
+ new_order.persist_totals if new_order.id
17
19
  end
18
20
 
19
21
  end
@@ -39,6 +39,16 @@ describe Spree::Admin::RepeatedOrdersController do
39
39
  line_item_clone_2.stub(:reload_price)
40
40
  end
41
41
 
42
+ it 'should update order totals' do
43
+ Spree::Order.should_receive(:find_by).with(number: 'ABC1').and_return(past_order)
44
+ Spree::Order.stub(:new).and_return(new_order)
45
+
46
+ new_order.should_receive(:update_totals)
47
+ new_order.should_receive(:persist_totals)
48
+
49
+ spree_post :create, number: "ABC1"
50
+ end
51
+
42
52
  it 'should create new order with old order items' do
43
53
  Spree::Order.should_receive(:find_by).with(number: 'ABC1').and_return(past_order)
44
54
  Spree::Order.stub(:new).and_return(new_order)
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_repeat_order'
5
- s.version = '2.2.1'
5
+ s.version = '2.2.2'
6
6
  s.summary = 'Makes it possible to repeat an existing order with one click'
7
7
  s.description = ''
8
8
  s.required_ruby_version = '>= 2.0.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_repeat_order
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francisco Trindade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-02 00:00:00.000000000 Z
11
+ date: 2014-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core