2017-11-21 21:50:03 +00:00
|
|
|
FactoryBot.define do
|
2017-05-02 11:37:20 +00:00
|
|
|
factory :ticket do
|
2019-03-11 07:28:18 +00:00
|
|
|
transient do
|
|
|
|
state_name 'new'
|
|
|
|
priority_name '2 normal'
|
|
|
|
end
|
|
|
|
|
2019-02-04 06:56:18 +00:00
|
|
|
title { 'Test Ticket' }
|
|
|
|
group
|
|
|
|
customer
|
2019-03-11 07:28:18 +00:00
|
|
|
state { Ticket::State.lookup(name: state_name) }
|
|
|
|
priority { Ticket::Priority.lookup(name: priority_name) }
|
2019-02-04 06:56:18 +00:00
|
|
|
updated_by_id { 1 }
|
|
|
|
created_by_id { 1 }
|
2018-12-13 09:06:44 +00:00
|
|
|
|
|
|
|
factory :twitter_ticket do
|
|
|
|
transient do
|
|
|
|
channel { create(:twitter_channel) }
|
|
|
|
end
|
|
|
|
|
|
|
|
preferences do
|
|
|
|
{
|
2018-12-19 17:31:51 +00:00
|
|
|
channel_id: channel.id,
|
2018-12-13 09:06:44 +00:00
|
|
|
channel_screen_name: channel.options[:user][:screen_name]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2017-05-02 11:37:20 +00:00
|
|
|
end
|
|
|
|
end
|