mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix bulk_order_management spec by setting ship address on the stest order, this makes the order worflow work up to complete because the shipping methods will be validated against the address
This commit is contained in:
@@ -591,8 +591,9 @@ feature %q{
|
||||
|
||||
context "using action buttons" do
|
||||
context "using edit buttons" do
|
||||
let!(:o1) { create(:order_with_distributor, state: 'complete', completed_at: Time.zone.now ) }
|
||||
let!(:o2) { create(:order_with_distributor, state: 'complete', completed_at: Time.zone.now ) }
|
||||
let(:address) { create(:address) }
|
||||
let!(:o1) { create(:order_with_distributor, ship_address: address, state: 'complete', completed_at: Time.zone.now ) }
|
||||
let!(:o2) { create(:order_with_distributor, ship_address: address, state: 'complete', completed_at: Time.zone.now ) }
|
||||
let!(:li1) { create(:line_item_with_shipment, order: o1 ) }
|
||||
let!(:li2) { create(:line_item_with_shipment, order: o2 ) }
|
||||
|
||||
@@ -620,6 +621,7 @@ feature %q{
|
||||
within "tr#li_#{li1.id}" do
|
||||
find("a.edit-order").click
|
||||
end
|
||||
|
||||
expect(URI.parse(current_url).path).to eq "/admin/orders/#{o1.number}/edit"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user