From f77ecc196859e074bc881115728266ce7cadcd23 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Tue, 1 Feb 2022 11:15:26 +0000 Subject: [PATCH] Improve and simplify return authorizations test setup --- .../admin/return_authorizations_controller_spec.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/spec/controllers/spree/admin/return_authorizations_controller_spec.rb b/spec/controllers/spree/admin/return_authorizations_controller_spec.rb index 982944065a..7c19cfc7d3 100644 --- a/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +++ b/spec/controllers/spree/admin/return_authorizations_controller_spec.rb @@ -7,20 +7,10 @@ module Spree describe ReturnAuthorizationsController, type: :controller do include AuthenticationHelper - let(:order) do - create(:order, :with_line_item, :completed, - distributor: create(:distributor_enterprise) ) - end + let(:order) { create(:shipped_order, distributor: create(:distributor_enterprise)) } before do controller_login_as_admin - - # Pay the order - order.payments.first.complete - order.update_order! - - # Ship the order - order.shipment.ship! end it "creates and updates a return authorization" do