Skip to content

Commit

Permalink
Use Order::Contents service in test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-Yorkley committed Jun 14, 2021
1 parent bfd8d94 commit 12bf4c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/controllers/checkout_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
let(:shipping_method) { distributor.shipping_methods.first }

before do
order.line_items << create(:line_item, variant: order_cycle.variants_distributed_by(distributor).first)
order.contents.add(order_cycle.variants_distributed_by(distributor).first)

allow(controller).to receive(:current_distributor).and_return(distributor)
allow(controller).to receive(:current_order_cycle).and_return(order_cycle)
Expand Down

0 comments on commit 12bf4c3

Please sign in to comment.