From 2c8a1f5e78d9bb78e495fb5a666a0f747d2190cc Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Fri, 23 Nov 2018 11:51:23 +0100 Subject: [PATCH] Check for value and not object identity in spec --- spec/services/restart_checkout_spec.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/spec/services/restart_checkout_spec.rb b/spec/services/restart_checkout_spec.rb index 17db99ace1..e1cd40a355 100644 --- a/spec/services/restart_checkout_spec.rb +++ b/spec/services/restart_checkout_spec.rb @@ -28,20 +28,20 @@ describe RestartCheckout do # 'pending' when the order has not been completed, so this is not a case that requires testing. it "resets the order state, and clears incomplete shipments and payments" do expect(order).to receive(:restart_checkout!).and_call_original - expect(order.shipping_method_id).to_not be nil - expect(order.shipments.count).to be 1 - expect(order.adjustments.shipping.count).to be 1 - expect(order.payments.count).to be 2 - expect(order.adjustments.payment_fee.count).to be 2 + expect(order.shipping_method_id).to_not eq nil + expect(order.shipments.count).to eq 1 + expect(order.adjustments.shipping.count).to eq 1 + expect(order.payments.count).to eq 2 + expect(order.adjustments.payment_fee.count).to eq 2 RestartCheckout.new(order).restart_checkout expect(order.reload.state).to eq 'cart' - expect(order.shipping_method_id).to be nil - expect(order.shipments.count).to be 0 - expect(order.adjustments.shipping.count).to be 0 - expect(order.payments.count).to be 1 - expect(order.adjustments.payment_fee.count).to be 1 + expect(order.shipping_method_id).to eq nil + expect(order.shipments.count).to eq 0 + expect(order.adjustments.shipping.count).to eq 0 + expect(order.payments.count).to eq 1 + expect(order.adjustments.payment_fee.count).to eq 1 end end end