Fix various spec

This commit is contained in:
Gaetan Craig-Riou
2025-01-22 13:51:16 +11:00
parent 6b7373e4cf
commit cd7e92c6ca
4 changed files with 13 additions and 9 deletions

View File

@@ -16,8 +16,10 @@ module Addressing
end
def zone
zone = Spree::Zone.find_or_create_by!(name: ENV.fetch('CHECKOUT_ZONE'))
zone.members.create!(zoneable: country) unless zone.zoneables.include?(country)
zone = Spree::Zone.find_or_create_by(name: ENV.fetch('CHECKOUT_ZONE'))
zone.members << Spree::ZoneMember.create(zoneable: country) unless
zone.zoneables.include?(country)
zone.save!
zone
end