Skip to content

Commit

Permalink
Fix broken ShipmentOrderResult spec
Browse files Browse the repository at this point in the history
  • Loading branch information
aldesantis committed Sep 19, 2019
1 parent 8be8823 commit b0d942b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -107,7 +107,7 @@ def process
tracking_number: carton.tracking_number,
suppress_mailer: true,
)
end
end.compact

shipment.update!(tracking: cartons.map(&:tracking_number).join(','))

Expand Down
Expand Up @@ -191,6 +191,18 @@
]
end

before do
allow(shipment).to receive(:update!)

allow(shipment.order).to receive(:reload)
.and_return(shipment.order)

allow(shipment.order).to receive(:update!)

allow(Spree::Config.carton_shipped_email_class).to receive(:multi_shipped_email)
.and_return(multi_carton_mailer)
end

it 'does not raise RecordInvalid exception' do
expect { subject.process }.not_to raise_error
end
Expand Down

0 comments on commit b0d942b

Please sign in to comment.