summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJoel Jackson <jackson.joel@gmail.com>2017-06-09 09:10:06 -0700
committerBrendan Deere <brendan@stembolt.com>2017-07-24 10:36:08 -0700
commitcb9c60d8252c4b72c756c76501ae4f51646f389f (patch)
treefb373d14dcaa842bbaedba8245de9365e349089b /spec
parent814a1bed9496ac05f6eb280843b530b1e15e3b91 (diff)
Fix rubocop warnings, restore checkout flow after checkout flow spec and actually make address and payment set in the checkout step.
Diffstat (limited to 'spec')
-rw-r--r--spec/models/solidus_subscriptions/checkout_spec.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/models/solidus_subscriptions/checkout_spec.rb b/spec/models/solidus_subscriptions/checkout_spec.rb
index 49c6dc6..caa68a3 100644
--- a/spec/models/solidus_subscriptions/checkout_spec.rb
+++ b/spec/models/solidus_subscriptions/checkout_spec.rb
@@ -107,18 +107,23 @@ RSpec.describe SolidusSubscriptions::Checkout do
context 'Altered checkout flow' do
before do
+ @old_checkout_flow = Spree::Order.checkout_flow
Spree::Order.remove_checkout_step(:delivery)
end
+ after do
+ Spree::Order.checkout_flow(&@old_checkout_flow)
+ end
+
it 'has a payment' do
expect(order.payments.valid).to be_present
end
it 'has the correct totals' do
expect(order).to have_attributes(
- total: 39.98,
- shipment_total: 0
- )
+ total: 39.98,
+ shipment_total: 0
+ )
end
it { is_expected.to be_complete }