Sha256: 576a3f0d7b0e181a430b636120ba3b082d7e228a43af19637893fd2f7fb55747

Contents?: true

Size: 1.71 KB

Versions: 14

Compression:

Stored size: 1.71 KB

Contents

FactoryGirl.define do

  factory :document, :class => 'DigitalAsset::Document' do
    path '/some/crazy/file.path'
    doc_changed_at 2.days.ago
    content_type '777'
  end

  factory :digital_asset do
    title 'Doc Title'
    changed_at 2.days.ago
    audiences ['490']
    sequence(:guid) {|n| "guid-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(:documents) {|n|[DigitalAsset::Document.new(path: "/#{n}/foo/bar.txt", doc_changed_at: 2.days.ago, content_type: '666')]}

    factory :fund_doc do
      product_ids ['666']
      factory :sai do
        sequence(:documents) {|n|[DigitalAsset::Document.new(path: "/#{n}/foo/bar.txt", 
           doc_changed_at: 2.days.ago, content_type: DigitalAsset::ContentType::SAI)]}
      end    
      factory :prospectus do
        sequence(:documents) {|n|[DigitalAsset::Document.new(path: "/#{n}/foo/bar.txt", 
           doc_changed_at: 2.days.ago, content_type: DigitalAsset::ContentType::PROSPECTUS)]}
      end    
      factory :factsheet do
        sequence(:documents) {|n|[DigitalAsset::Document.new(path: "/#{n}/foo/bar.txt", 
           doc_changed_at: 2.days.ago, content_type: DigitalAsset::ContentType::FACTSHEET)]}
      end    
      factory :commentary do
        sequence(:documents) {|n|[DigitalAsset::Document.new(path: "/#{n}/foo/bar.txt", 
           doc_changed_at: 2.days.ago, content_type: DigitalAsset::ContentType::COMMENTARY)]}
      end    
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
daengine-0.5.13 spec/factories.rb
daengine-0.5.10 spec/factories.rb
daengine-0.5.9 spec/factories.rb
daengine-0.5.8 spec/factories.rb
daengine-0.5.7 spec/factories.rb
daengine-0.5.2 spec/factories.rb
daengine-0.5.1 spec/factories.rb
daengine-0.5.0 spec/factories.rb
daengine-0.4.9 spec/factories.rb
daengine-0.4.8 spec/factories.rb
daengine-0.4.7.9 spec/factories.rb
daengine-0.4.7.8 spec/factories.rb
daengine-0.4.7.7 spec/factories.rb
daengine-0.4.7.6 spec/factories.rb