From e217a6fca86eb8c247f120f3fd93c0e610656233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <2887858+deivid-rodriguez@users.noreply.github.com> Date: Thu, 23 Oct 2025 15:28:49 +0200 Subject: [PATCH] Make enterprise unit specs about removal consistent And not dependent on implementation details. --- spec/models/enterprise_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/models/enterprise_spec.rb b/spec/models/enterprise_spec.rb index 8e990ca3bd..825a7e3941 100644 --- a/spec/models/enterprise_spec.rb +++ b/spec/models/enterprise_spec.rb @@ -58,7 +58,7 @@ RSpec.describe Enterprise do expect(EnterpriseRelationship.where(id: [er1, er2])).to be_empty end - it "raises a DeleteRestrictionError on destroy if distributed_orders exist" do + it "does not destroy distributed_orders upon destroy" do enterprise = create(:distributor_enterprise) create_list(:order, 2, distributor: enterprise) @@ -69,7 +69,7 @@ RSpec.describe Enterprise do .and change { Spree::Order.count }.by(0) end - it "raises an DeleteRestrictionError on destroy if distributor_payment_methods exist" do + it "does not destroy distributor_payment_methods upon destroy" do enterprise = create(:distributor_enterprise) create_list(:distributor_payment_method, 2, distributor: enterprise) @@ -80,7 +80,7 @@ RSpec.describe Enterprise do .and change { DistributorPaymentMethod.count }.by(0) end - it "raises an DeleteRestrictionError on destroy if distributor_shipping_methods exist" do + it "does not destroy distributor_shipping_methods upon destroy" do enterprise = create(:distributor_enterprise) create_list(:distributor_shipping_method, 2, distributor: enterprise)