solidus_core 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of solidus_core might be problematic. Click here for more details.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4cd6430d3c1e5e19bb9548632a70531888a50fd
|
4
|
+
data.tar.gz: 8ebdda8f5f4cbb1f4a1aff2d9c9aeb4590a5ac99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7949cdb760035f8934188282eda1bdb3e847f96b86f65fb1af42c6e9c295a9373f8801d15a2c6eb51c371d18b26cbbf1920055ab710198039b97173699453db3
|
7
|
+
data.tar.gz: f64d4a9cb6429ac91d365022386edabec822ac6f54b7b57588fd8c8264f584ca409a4063e71df4484dd6c00dc44f8e1c841df1f2e42110f2c16dbafd07121e00
|
data/lib/spree/core/version.rb
CHANGED
@@ -201,10 +201,12 @@ describe Spree::OrderInventory, type: :model do
|
|
201
201
|
end
|
202
202
|
|
203
203
|
it 'should destroy self if not inventory units remain' do
|
204
|
-
|
205
|
-
|
204
|
+
shipment.inventory_units[1...999].each(&:destroy)
|
205
|
+
shipment.inventory_units.reload
|
206
206
|
|
207
|
-
expect
|
207
|
+
expect {
|
208
|
+
expect(subject.send(:remove_from_shipment, shipment, 1)).to eq(1)
|
209
|
+
}.to change{ order.shipments.count }.from(1).to(0)
|
208
210
|
end
|
209
211
|
|
210
212
|
context "inventory unit line item and variant points to different products" do
|
@@ -17,12 +17,12 @@ describe Spree::Payment, type: :model do
|
|
17
17
|
let(:card) { create :credit_card }
|
18
18
|
|
19
19
|
let(:payment) do
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
20
|
+
Spree::Payment.create! do |payment|
|
21
|
+
payment.source = card
|
22
|
+
payment.order = order
|
23
|
+
payment.payment_method = gateway
|
24
|
+
payment.amount = 5
|
25
|
+
end
|
26
26
|
end
|
27
27
|
|
28
28
|
let(:amount_in_cents) { (payment.amount * 100).round }
|
@@ -39,11 +39,6 @@ describe Spree::Payment, type: :model do
|
|
39
39
|
ActiveMerchant::Billing::Response.new(false, '', {}, {})
|
40
40
|
end
|
41
41
|
|
42
|
-
before(:each) do
|
43
|
-
# So it doesn't create log entries every time a processing method is called
|
44
|
-
allow(payment.log_entries).to receive(:create!)
|
45
|
-
end
|
46
|
-
|
47
42
|
context '.risky' do
|
48
43
|
let!(:payment_1) { create(:payment, avs_response: 'Y', cvv_response_code: 'M', cvv_response_message: 'Match') }
|
49
44
|
let!(:payment_2) { create(:payment, avs_response: 'Y', cvv_response_code: 'M', cvv_response_message: '') }
|
@@ -246,8 +241,9 @@ describe Spree::Payment, type: :model do
|
|
246
241
|
|
247
242
|
it "should log the response" do
|
248
243
|
payment.save!
|
249
|
-
expect
|
250
|
-
|
244
|
+
expect {
|
245
|
+
payment.authorize!
|
246
|
+
}.to change { payment.log_entries.count }.by(1)
|
251
247
|
end
|
252
248
|
|
253
249
|
describe 'billing_address option' do
|
@@ -355,8 +351,9 @@ describe Spree::Payment, type: :model do
|
|
355
351
|
|
356
352
|
it "should log the response" do
|
357
353
|
payment.save!
|
358
|
-
expect
|
359
|
-
|
354
|
+
expect {
|
355
|
+
payment.purchase!
|
356
|
+
}.to change { payment.log_entries.count }.by(1)
|
360
357
|
end
|
361
358
|
|
362
359
|
context "if successful" do
|
@@ -532,8 +529,9 @@ describe Spree::Payment, type: :model do
|
|
532
529
|
end
|
533
530
|
|
534
531
|
it "should log the response" do
|
535
|
-
expect
|
536
|
-
|
532
|
+
expect {
|
533
|
+
payment.void_transaction!
|
534
|
+
}.to change { payment.log_entries.count }.by(1)
|
537
535
|
end
|
538
536
|
|
539
537
|
context "if successful" do
|
@@ -691,6 +689,8 @@ describe Spree::Payment, type: :model do
|
|
691
689
|
end
|
692
690
|
|
693
691
|
it "should not try to create profiles on old failed payment attempts" do
|
692
|
+
order.payments.destroy_all
|
693
|
+
|
694
694
|
allow_any_instance_of(Spree::Payment).to receive(:payment_method) { gateway }
|
695
695
|
|
696
696
|
order.payments.create!(
|
@@ -554,7 +554,8 @@ describe Spree::Promotion, type: :model do
|
|
554
554
|
allow(rule2).to receive_messages(eligible?: true, applicable?: true)
|
555
555
|
|
556
556
|
promotion.promotion_rules = [rule1, rule2]
|
557
|
-
allow(promotion
|
557
|
+
allow(promotion).to receive_message_chain(:rules, :none?).and_return(false)
|
558
|
+
allow(promotion).to receive_message_chain(:rules, :for).and_return(promotion.promotion_rules)
|
558
559
|
end
|
559
560
|
it "returns the eligible rules" do
|
560
561
|
expect(promotion.eligible_rules(promotable)).to eq [rule1, rule2]
|
@@ -572,7 +573,8 @@ describe Spree::Promotion, type: :model do
|
|
572
573
|
allow(rule2).to receive_messages(eligible?: false, applicable?: true, eligibility_errors: errors)
|
573
574
|
|
574
575
|
promotion.promotion_rules = [rule1, rule2]
|
575
|
-
allow(promotion
|
576
|
+
allow(promotion).to receive_message_chain(:rules, :none?).and_return(false)
|
577
|
+
allow(promotion).to receive_message_chain(:rules, :for).and_return(promotion.promotion_rules)
|
576
578
|
end
|
577
579
|
it "returns nil" do
|
578
580
|
expect(promotion.eligible_rules(promotable)).to be_nil
|
@@ -604,7 +606,8 @@ describe Spree::Promotion, type: :model do
|
|
604
606
|
allow(rule).to receive_messages(eligible?: false, applicable?: true, eligibility_errors: errors)
|
605
607
|
|
606
608
|
promotion.promotion_rules = [rule]
|
607
|
-
allow(promotion
|
609
|
+
allow(promotion).to receive_message_chain(:rules, :for).and_return(promotion.promotion_rules)
|
610
|
+
allow(promotion).to receive_message_chain(:rules, :none?).and_return(false)
|
608
611
|
end
|
609
612
|
it "returns nil" do
|
610
613
|
expect(promotion.eligible_rules(promotable)).to be_nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|
@@ -1409,7 +1409,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1409
1409
|
version: '0'
|
1410
1410
|
requirements: []
|
1411
1411
|
rubyforge_project:
|
1412
|
-
rubygems_version: 2.
|
1412
|
+
rubygems_version: 2.6.11
|
1413
1413
|
signing_key:
|
1414
1414
|
specification_version: 4
|
1415
1415
|
summary: Essential models, mailers, and classes for the Solidus e-commerce project.
|