Sha256: 3858fe91440ec9c46eb40dcfb55a48619db5e629db473326f2a0e20049f5032f

Contents?: true

Size: 303 Bytes

Versions: 102

Compression:

Stored size: 303 Bytes

Contents

FactoryBot.define do
  factory :state, class: Spree::State do
    sequence(:name) { |n| "STATE_NAME_#{n}" }
    sequence(:abbr) { |n| "STATE_ABBR_#{n}" }
    country do |country|
      usa = Spree::Country.find_by(numcode: 840)
      usa.present? ? usa : country.association(:country)
    end
  end
end

Version data entries

102 entries across 102 versions & 1 rubygems

Version Path
spree_core-4.10.1 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.10.0 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.9.0 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.8.3 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.8.2 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.7.3 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.6.6 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.5.5 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.0.9 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.1.15 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.2.7 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.3.3 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.4.1 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.5.4 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.6.5 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.7.2 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.7.1 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.6.4 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.7.0 lib/spree/testing_support/factories/state_factory.rb
spree_core-4.6.3 lib/spree/testing_support/factories/state_factory.rb