Skip to content

Commit

Permalink
Small linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rioug committed Jan 20, 2025
1 parent c71ae35 commit 17e7f7d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/models/spree/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,17 @@
end
end

context "#process_payments!" do
describe "#process_payments!" do
let(:payment) { build(:payment) }
before { allow(order).to receive_messages pending_payments: [payment], total: 10 }

it "should return false if no pending_payments available" do
it "returns false if no pending_payments available" do
allow(order).to receive_messages pending_payments: []
expect(order.process_payments!).to be_falsy
end

context "when the processing is sucessful" do
it "should process the payments" do
it "processes the payments" do
expect(payment).to receive(:process!)
expect(order.process_payments!).to be_truthy
end
Expand All @@ -299,12 +299,12 @@
context "when a payment raises a GatewayError" do
before { expect(payment).to receive(:process!).and_raise(Spree::Core::GatewayError) }

it "should return true when configured to allow checkout on gateway failures" do
it "returns true when configured to allow checkout on gateway failures" do
Spree::Config.set allow_checkout_on_gateway_error: true
expect(order.process_payments!).to be_truthy
end

it "should return false when not configured to allow checkout on gateway failures" do
it "returns false when not configured to allow checkout on gateway failures" do
Spree::Config.set allow_checkout_on_gateway_error: false
expect(order.process_payments!).to be_falsy
end
Expand Down

0 comments on commit 17e7f7d

Please sign in to comment.