Sha256: e1f6cba666aa554c7ed0e561ead519f3cc3a1b80d0b3bf37b603ec390c3b324e

Contents?: true

Size: 459 Bytes

Versions: 6

Compression:

Stored size: 459 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :asset, class: "Archangel::Asset" do
    site
    sequence(:file_name) { |n| "image-#{n}.jpg" }
    file { fixture_file_upload(uploader_test_image) }
    content_type "image/jpg"
    file_size 123

    trait :stylesheet do
      file { fixture_file_upload(uploader_test_stylesheet) }
      content_type "text/css"
    end

    trait :deleted do
      deleted_at { Time.current }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
archangel-0.0.7 lib/archangel/testing_support/factories/archangel_assets.rb
archangel-0.0.6 lib/archangel/testing_support/factories/archangel_assets.rb
archangel-0.0.5 lib/archangel/testing_support/factories/archangel_assets.rb
archangel-0.0.4 lib/archangel/testing_support/factories/archangel_assets.rb
archangel-0.0.3 lib/archangel/testing_support/factories/archangel_assets.rb
archangel-0.0.2 lib/archangel/testing_support/factories/archangel_assets.rb