Skip to content

Commit

Permalink
Merge pull request #3688 from nebulab/spaghetticode/flaky-spec
Browse files Browse the repository at this point in the history
Do not attempt to create multiple records with `global_zone` factory
  • Loading branch information
kennyadsl authored Jul 7, 2020
2 parents 08f6301 + 34ca4fd commit 8b37c63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/spree/testing_support/factories/zone_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

FactoryBot.define do
factory :global_zone, class: 'Spree::Zone' do
name { 'GlobalZone' }
initialize_with { Spree::Zone.find_or_initialize_by(name: 'GlobalZone') }
zone_members do |proxy|
zone = proxy.instance_eval { @instance }
Spree::Country.all.map do |c|
Expand Down

0 comments on commit 8b37c63

Please sign in to comment.