Sha256: 74a2f8bd50dfed39149a30e90ae4d3e813fa2774d8f754b2197f9b2aac53f875
Contents?: true
Size: 593 Bytes
Versions: 56
Compression:
Stored size: 593 Bytes
Contents
FactoryBot.define do factory :cmor_files_file_detail, class: 'Cmor::Files::FileDetail' do association :folder, factory: :cmor_files_folder after(:build) { |resource| assets = resource.folder.assets.attach( io: File.open(File.join(Cmor::Files::Engine.root.join(*%w( spec files cmor files file_details example.png)))), filename: 'example.png', content_type: 'image/png' ) if Rails.version < "6.0.0" resource.asset = assets.first else resource.asset = resource.folder.assets.first end } end end
Version data entries
56 entries across 56 versions & 1 rubygems