Sha256: 2fce6e90280629b17fc6c9ecc5d0f8928d4040536b4e30772ffe05cacbfac033

Contents?: true

Size: 1.79 KB

Versions: 6

Compression:

Stored size: 1.79 KB

Contents

FactoryGirl.define do

  factory :digital_asset do
    title 'Doc Title'
    changed_at 2.days.ago
    audiences ['investor']
    sequence(:digital_asset_id) { |n| "id-foobar-permanent-#{n}" }
    published_at 10.days.ago
    expires_at 2.months.from_now
    sami_code 'IL1111.077'
    business_owner 'biz owner'
    omniture_codes ["KOW2MY24D"]
    sequence(:path) { |n| "/#{n}/foo/bar.txt" }
    sequence(:finra_path) { |n| "/path/finradoc/#{n}/foo/bar.txt" }
    sequence(:legacy_path) { |n| "/oldpath/#{n}/foo/bar.txt" }
    doc_changed_at 2.days.ago
    content_type 'fact_sheet'
    fund_codes ['00200', '00190', '00210']
  end

  factory :service_digital_asset do
    title 'Doc Title'
    changed_at 2.days.ago
    audiences ['490']
    sequence(:digital_asset_id) { |n| "id-foobar-permanent-#{n}" }
    published_at 10.days.ago
    expires_at 2.months.from_now
    sami_code 'IL1111.077'
    product_ids ['690', '420']
    business_owner 'biz owner'
    content_organization_ids ['LWXO44E8J', 'LWXO5XI3C']
    program_ids ["LKZWOFHR6", "LKZWOFGF2"]
    omniture_codes ["KOW2MY24D"]
    sequence(:path) { |n| "/#{n}/foo/bar.txt" }
    doc_changed_at 2.days.ago
    content_type '666'
    fund_codes []
    display_on_website true
  end

  factory :content_folder, aliases: [:child_folder] do
    sequence(:folder_id) { |n| "id-a-content-folder-#{n}" }
    label 'Folder Label'

    trait :document_ids do
      document_ids ['doc_id1', 'doc_id2']
    end

    factory :content_folder_with_child_folders do
      sequence(:folder_id) { |n| "id-content-folder-#{n}" }
      label 'Root Label'

      child_folders { build_list(:content_folder, 1, document_ids: ['child_doc_id']) }
    end

    factory :content_folder_with_document_ids, traits: [:document_ids]
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
daengine-0.7.3 spec/factories.rb
daengine-0.7.2 spec/factories.rb
daengine-0.7.1 spec/factories.rb
daengine-0.7 spec/factories.rb
daengine-0.6.23 spec/factories.rb
daengine-0.6.22 spec/factories.rb