mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Bring required state factory
It was removed from master in
2abbfad18c
but it's still required by the zone_specs and the address factory.
This commit is contained in:
13
spec/factories/state_factory.rb
Normal file
13
spec/factories/state_factory.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
FactoryBot.define do
|
||||
factory :state, class: Spree::State do
|
||||
name 'Alabama'
|
||||
abbr 'AL'
|
||||
country do |country|
|
||||
if usa = Spree::Country.find_by_numcode(840)
|
||||
country = usa
|
||||
else
|
||||
country.association(:country)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user