Skip to content

Commit 75c5aeb

Browse files
Fix order walkthrough for iso uniqueness
ISO is now a unique field on countries which means that creating two countries errors. Creating the country here broke tests in some extensions including solidus_starter_frontend.
1 parent 0994f63 commit 75c5aeb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/lib/spree/testing_support/order_walkthrough.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def self.up_to(state, user: nil)
1010
def up_to(state, user: nil)
1111
# Need to create a valid zone too...
1212
@zone = ::FactoryBot.create(:zone)
13-
@country = ::FactoryBot.create(:country)
13+
@country = Spree::Country.find_by(iso: "US") || ::FactoryBot.create(:country)
1414
@state = ::FactoryBot.create(:state, country: @country)
1515

1616
@zone.members << Spree::ZoneMember.create(zoneable: @country)

0 commit comments

Comments
 (0)