Sha256: c147a6e52c465ef11d8faf1e6083ebb71bd5af5feccacf014cbe60fda2009652

Contents?: true

Size: 269 Bytes

Versions: 8

Compression:

Stored size: 269 Bytes

Contents

FactoryGirl.modify do
  # Products need to belong to the same store as the order.
  factory :line_item do
    before(:create) do |line_item, evaluator|
      if line_item.order.store
        line_item.product.stores << line_item.order.store
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
solidus_multi_domain-1.2.0 spec/support/factory_overrides.rb
solidus_multi_domain-1.1.3 spec/support/factory_overrides.rb
solidus_multi_domain-1.1.2 spec/support/factory_overrides.rb
solidus_multi_domain-1.1.1 spec/support/factory_overrides.rb
solidus_multi_domain-1.0.3 spec/support/factory_overrides.rb
solidus_multi_domain-1.1.0 spec/support/factory_overrides.rb
solidus_multi_domain-1.0.1 spec/support/factory_overrides.rb
solidus_multi_domain-1.0.0 spec/support/factory_overrides.rb