2019-01-22 16:35:01 +00:00
|
|
|
FactoryBot.define do
|
|
|
|
factory :history do
|
2019-02-10 12:24:22 +00:00
|
|
|
transient do
|
|
|
|
o { Ticket.first }
|
2021-02-15 13:55:00 +00:00
|
|
|
|
|
|
|
history_type { 'update' }
|
|
|
|
history_attribute { 'state' }
|
2019-02-10 12:24:22 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
o_id { o.id }
|
2019-01-22 16:35:01 +00:00
|
|
|
created_by_id { 1 }
|
2019-02-10 12:24:22 +00:00
|
|
|
|
2021-02-15 13:55:00 +00:00
|
|
|
history_type_id do
|
|
|
|
History.type_lookup(history_type).id
|
|
|
|
end
|
|
|
|
|
|
|
|
history_attribute_id do
|
|
|
|
History.attribute_lookup(history_attribute).id
|
|
|
|
end
|
|
|
|
|
2019-02-10 12:24:22 +00:00
|
|
|
history_object_id do
|
2021-02-15 13:55:00 +00:00
|
|
|
History.object_lookup(o.class.name).id
|
2019-02-10 12:24:22 +00:00
|
|
|
end
|
2019-01-22 16:35:01 +00:00
|
|
|
end
|
|
|
|
end
|