Sha256: 5ac3c1008172c3fdf7d18454550b6fcc867f3cd02cecd1ae7c445d4fcd723860

Contents?: true

Size: 1010 Bytes

Versions: 30

Compression:

Stored size: 1010 Bytes

Contents

FactoryGirl.define do
  factory :product_group_condition do

    trait :price_condition do
      name :price
      operator 'lt'
      value 43
    end

    trait :name_condition do
      name :name
      operator 'starts'
      value 'george'
    end

    trait :text_condition do
      name  { FactoryGirl.create(:text_custom_field).id }
      operator 'starts'
      value 'george'
    end

    trait :number_condition do
      name  { FactoryGirl.create(:number_custom_field).id }
      operator 'lt'
      value 43
    end

    trait :date_condition do
      name  { FactoryGirl.create(:date_custom_field).id }
      operator 'gt'
      value { '1/1/2001' }
    end

    factory :date_group_condition,   traits: [ :date_condition ]
    factory :text_group_condition,   traits: [ :text_condition ]
    factory :number_group_condition, traits: [ :number_condition ]
    factory :price_group_condition,  traits: [ :price_condition ]
    factory :name_group_condition,   traits: [ :name_condition ]
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
nimbleshop_core-0.0.23 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.21 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.20 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.19 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.17 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.16 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.15 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.14 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.14.rc2 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.14.rc1 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.13 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.12 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.11 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.10 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.9 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.8 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.7 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.5 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.4.beta1 test/factories/product_group_condition_factory.rb
nimbleshop_core-0.0.4 test/factories/product_group_condition_factory.rb