AlchemyCMS/alchemy_cms

View on GitHub
lib/alchemy/test_support/factories/attachment_factory.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

FactoryBot.define do
  factory :alchemy_attachment, class: "Alchemy::Attachment" do
    file do
      File.new(Alchemy::Engine.root.join("lib", "alchemy", "test_support", "fixtures", "image.png"))
    end
    name { "image" }
    file_name { "image.png" }
  end
end