From a0bd290b6ac6a9ca9918a7a7e7271280f8dee548 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Sat, 16 Feb 2019 21:47:28 +0000 Subject: [PATCH] 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 --- spec/features/admin/bulk_order_management_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/features/admin/bulk_order_management_spec.rb b/spec/features/admin/bulk_order_management_spec.rb index 6c90af7243..698c7bb666 100644 --- a/spec/features/admin/bulk_order_management_spec.rb +++ b/spec/features/admin/bulk_order_management_spec.rb @@ -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