From cd956daddae27a765f715a20efb2241bc4568d81 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 27 Jan 2026 09:23:32 +1100 Subject: [PATCH] Use factory to create address It removes dependency on hard coded country and state id --- spec/system/consumer/registration_spec.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/spec/system/consumer/registration_spec.rb b/spec/system/consumer/registration_spec.rb index ad37f4a8c1..13c7916a21 100644 --- a/spec/system/consumer/registration_spec.rb +++ b/spec/system/consumer/registration_spec.rb @@ -165,11 +165,7 @@ RSpec.describe "Registration" do end before do - address = Spree::Address.create!(firstname: 'John', lastname: 'Doe', - address1: '1400 Sesame street', zipcode: '3070', - city: 'Southcote', phone: '12 3456 7890', - country_id: 1, state_id: 1, company: 'unused') - Enterprise.create(name: 'My Awesome Enterprise', address:, owner:) + Enterprise.create(name: 'My Awesome Enterprise', address: create(:address), owner:) end it "checks that button after failure is still enabled" do