Sha256: b680e763fceb72d3eb11ed9e242ec155839b5b38d60b8a4fd7f737c88031464c

Contents?: true

Size: 1.79 KB

Versions: 5

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-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

5 entries across 5 versions & 1 rubygems

Version Path
daengine-0.6.21 spec/factories.rb
daengine-0.6.20 spec/factories.rb
daengine-0.6.19 spec/factories.rb
daengine-0.6.18 spec/factories.rb
daengine-0.6.17 spec/factories.rb