2018-08-29 19:50:58 +00:00
|
|
|
FactoryBot.define do
|
|
|
|
factory :calendar do
|
|
|
|
sequence(:name) { |n| "Escalation Test #{n}" }
|
2019-03-27 09:01:36 +00:00
|
|
|
timezone { 'Europe/Berlin' }
|
|
|
|
default { true }
|
|
|
|
ical_url { nil }
|
2019-04-08 13:50:21 +00:00
|
|
|
|
2019-03-27 09:01:36 +00:00
|
|
|
business_hours do
|
2018-08-29 19:50:58 +00:00
|
|
|
{
|
|
|
|
mon: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [['09:00', '17:00']]
|
|
|
|
},
|
|
|
|
tue: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [['09:00', '17:00']]
|
|
|
|
},
|
|
|
|
wed: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [['09:00', '17:00']]
|
|
|
|
},
|
|
|
|
thu: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [['09:00', '17:00']]
|
|
|
|
},
|
|
|
|
fri: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [['09:00', '17:00']]
|
|
|
|
},
|
|
|
|
sat: {
|
|
|
|
active: false,
|
|
|
|
timeframes: [['09:00', '17:00']]
|
|
|
|
},
|
|
|
|
sun: {
|
|
|
|
active: false,
|
|
|
|
timeframes: [['09:00', '17:00']]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
2019-04-08 13:50:21 +00:00
|
|
|
|
2019-03-27 09:01:36 +00:00
|
|
|
created_by_id { 1 }
|
|
|
|
updated_by_id { 1 }
|
2019-04-08 13:50:21 +00:00
|
|
|
|
|
|
|
trait :'24/7' do
|
|
|
|
business_hours do
|
|
|
|
{
|
|
|
|
mon: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [ ['00:00', '23:59'] ]
|
|
|
|
},
|
|
|
|
tue: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [ ['00:00', '23:59'] ]
|
|
|
|
},
|
|
|
|
wed: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [ ['00:00', '23:59'] ]
|
|
|
|
},
|
|
|
|
thu: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [ ['00:00', '23:59'] ]
|
|
|
|
},
|
|
|
|
fri: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [ ['00:00', '23:59'] ]
|
|
|
|
},
|
|
|
|
sat: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [ ['00:00', '23:59'] ]
|
|
|
|
},
|
|
|
|
sun: {
|
|
|
|
active: true,
|
|
|
|
timeframes: [ ['00:00', '23:59'] ]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2018-08-29 19:50:58 +00:00
|
|
|
end
|
|
|
|
end
|