# frozen_string_literal: true

require "factory_bot"

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" }
    image_file_name { "image.png" }
    upload_hash { Time.current.hash }
  end
end

# frozen_string_literal: true

require "factory_bot"

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

Remove image_file_name from picture factory
Remove image_file_name from picture factory

Dragonfly sets it to the image_file name anyway. Setting it to a staitc value even if the image_file might have another filename is not reflecting actual behavior.
