eBooru/test/factories/ticket.rb
Earlopain fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00

21 lines
351 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory(:ticket) do
initialize_with { new(qtype: qtype) }
transient do
content { nil }
end
qtype { "" }
reason { "test" }
creator
creator_ip_addr { "127.0.0.1" }
after :build do |ticket, options|
ticket.disp_id = options.content.id
end
end
end