Sha256: 1a62a60bda1f44a2b540ee66ee2413e37ceafb73add873fdaffe4fd9783d3c74

Contents?: true

Size: 536 Bytes

Versions: 30

Compression:

Stored size: 536 Bytes

Contents

FactoryGirl.define do
  factory :address, aliases: [:bill_address, :ship_address], class: Spree::Address do
    firstname 'John'
    lastname 'Doe'
    company 'Company'
    address1 '10 Lovely Street'
    address2 'Northwest'
    city 'Herndon'
    zipcode '20170'
    phone '123-456-7890'
    alternative_phone '123-456-7899'

    state { |address| address.association(:state) }
    country do |address|
      if address.state
        address.state.country
      else
        address.association(:country)
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
spree_core-2.1.12 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.1.11 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.1.10 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.0.13 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.1.9 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.1.8 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.0.12 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.1.7 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.0.11 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.0.10 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.1.6 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.2.1 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.2.0 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.1.5 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.0.9 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.1.4 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.0.8 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.1.3 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.0.7 lib/spree/testing_support/factories/address_factory.rb
spree_core-2.1.2 lib/spree/testing_support/factories/address_factory.rb