Skip to content

Commit

Permalink
Avoid stubbing in order_inventory_spec
Browse files Browse the repository at this point in the history
This spec had started failing as of Rails 5.0.3
  • Loading branch information
jhawthorn committed Jun 7, 2017
1 parent 143ea3e commit c7f5886
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/spec/models/spree/order_inventory_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@
end

it 'should destroy self if not inventory units remain' do
allow(shipment.inventory_units).to receive_messages(count: 0)
shipment.inventory_units[1...999].each(&:destroy)
shipment.inventory_units.reload

expect {
expect(subject.send(:remove_from_shipment, shipment, 1)).to eq(1)
Expand Down

0 comments on commit c7f5886

Please sign in to comment.