AlchemyCMS/alchemy_cms

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

Summary

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

FactoryBot.define do
  factory :alchemy_picture, class: "Alchemy::Picture" do
    image_file do
      File.new(Alchemy::Engine.root.join("lib", "alchemy", "test_support", "fixtures", "image.png"))
    end
    name { "image" }
    upload_hash { Time.current.hash }
  end
end