Skip to content

Commit

Permalink
Increase spec coverage for Spree::SimpleOrderContents
Browse files Browse the repository at this point in the history
There were two uncovered lines, and this adds coverage for those lines.
  • Loading branch information
mamhoff committed May 22, 2024
1 parent efcbcac commit 6415b7f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions core/spec/models/spree/simple_order_contents_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,16 @@
expect(subject.order).to receive(:check_shipments_and_restart_checkout)
subject.update_cart params
end

context "with invalid params" do
let(:params) do
{ number: "" }
end

it "returns false" do
expect(subject.update_cart(params)).to be false
end
end
end

context "completed order" do
Expand Down Expand Up @@ -333,4 +343,11 @@
end
end
end

describe "#advance" do
it "advances the order" do
expect(order).to receive(:next).at_least(:once)
subject.advance
end
end
end

0 comments on commit 6415b7f

Please sign in to comment.