scinote-web/spec/factories/tinymce_assets.rb
2020-07-03 16:48:32 +02:00

10 lines
296 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :tiny_mce_asset do
association :team, factory: :team
after(:create) do |tiny_mce_asset|
tiny_mce_asset.image.attach(io: File.open(Rails.root.join('spec/fixtures/files/test.jpg')), filename: 'test.jpg')
end
end
end