spree_core 3.1.3 → 3.1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fda09b369307c4509d6d6581ad4aaafe7b926d07
|
4
|
+
data.tar.gz: 6cad03a8dd918b6fa93c4a50cfb5c84d83663bfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a16807219ecdad98881d86671f3694574553ff202fc1cb979fe44b429be11a49459d0e52cf2b0cc51ba1608235975c6718d0d14050ae463d013df75815bd91f
|
7
|
+
data.tar.gz: 5afbdf7144d7e61ca450949ad3a7fae54cddd9f231a39b817365925502542d555057a6009fa7abb1da24ef2668a38b27aeef615c56ce12356ed0bb11e1436609
|
@@ -82,10 +82,11 @@ module Spree
|
|
82
82
|
|
83
83
|
# Find any incomplete orders for the guest_token
|
84
84
|
incomplete_orders = Spree::Order.incomplete.includes(line_items: [variant: [:images, :option_values, :product]])
|
85
|
+
guest_token_order_params = current_order_params.except(:user_id)
|
85
86
|
order = if with_adjustments
|
86
|
-
incomplete_orders.includes(:adjustments).lock(options[:lock]).find_by(
|
87
|
+
incomplete_orders.includes(:adjustments).lock(options[:lock]).find_by(guest_token_order_params)
|
87
88
|
else
|
88
|
-
incomplete_orders.lock(options[:lock]).find_by(
|
89
|
+
incomplete_orders.lock(options[:lock]).find_by(guest_token_order_params)
|
89
90
|
end
|
90
91
|
|
91
92
|
# Find any incomplete orders for the current user
|
data/lib/spree/core/version.rb
CHANGED
@@ -45,6 +45,21 @@ describe Spree::Core::ControllerHelpers::Order, type: :controller do
|
|
45
45
|
expect(Spree::Order.last.store_id).to eq store.id
|
46
46
|
end
|
47
47
|
end
|
48
|
+
|
49
|
+
context 'gets using the guest_token' do
|
50
|
+
let!(:order) { create :order, user: user }
|
51
|
+
let!(:guest_order) { create :order, user: nil, email: nil, guest_token: 'token' }
|
52
|
+
|
53
|
+
before do
|
54
|
+
expect(controller).to receive(:current_order_params).and_return(
|
55
|
+
currency: Spree::Config[:currency], guest_token: 'token', store_id: guest_order.store_id, user_id: user.id,
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
specify 'without the guest token being bound to any user yet' do
|
60
|
+
expect(controller.current_order).to eq guest_order
|
61
|
+
end
|
62
|
+
end
|
48
63
|
end
|
49
64
|
|
50
65
|
describe '#associate_user' do
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|
@@ -1163,7 +1163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1163
1163
|
version: 1.8.23
|
1164
1164
|
requirements: []
|
1165
1165
|
rubyforge_project:
|
1166
|
-
rubygems_version: 2.
|
1166
|
+
rubygems_version: 2.6.10
|
1167
1167
|
signing_key:
|
1168
1168
|
specification_version: 4
|
1169
1169
|
summary: The bare bones necessary for Spree.
|