123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- FactoryBot.define do
- factory :job do
- sequence(:name) { |n| "Test job #{n}" }
- condition { { 'ticket.state_id' => { 'operator' => 'is not', 'value' => 4 } } }
- perform { { 'ticket.state_id' => { 'value' => 4 } } }
- active { true }
- created_by_id { 1 }
- updated_by_id { 1 }
- timeplan do
- { days: { Mon: true,
- Tue: false,
- Wed: false,
- Thu: false,
- Fri: false,
- Sat: false,
- Sun: false },
- hours: { 0 => true,
- 1 => false,
- 2 => false,
- 3 => false,
- 4 => false,
- 5 => false,
- 6 => false,
- 7 => false,
- 8 => false,
- 9 => false,
- 10 => false,
- 11 => false,
- 12 => false,
- 13 => false,
- 14 => false,
- 15 => false,
- 16 => false,
- 17 => false,
- 18 => false,
- 19 => false,
- 20 => false,
- 21 => false,
- 22 => false,
- 23 => false },
- minutes: { 0 => true,
- 10 => false,
- 20 => false,
- 30 => false,
- 40 => false,
- 50 => false } }
- end
- trait :always_on do
- timeplan do
- { days: { Mon: true,
- Tue: true,
- Wed: true,
- Thu: true,
- Fri: true,
- Sat: true,
- Sun: true },
- hours: { 0 => true,
- 1 => true,
- 2 => true,
- 3 => true,
- 4 => true,
- 5 => true,
- 6 => true,
- 7 => true,
- 8 => true,
- 9 => true,
- 10 => true,
- 11 => true,
- 12 => true,
- 13 => true,
- 14 => true,
- 15 => true,
- 16 => true,
- 17 => true,
- 18 => true,
- 19 => true,
- 20 => true,
- 21 => true,
- 22 => true,
- 23 => true },
- minutes: { 0 => true,
- 10 => true,
- 20 => true,
- 30 => true,
- 40 => true,
- 50 => true } }
- end
- end
- trait :never_on do
- timeplan do
- { days: { Mon: false,
- Tue: false,
- Wed: false,
- Thu: false,
- Fri: false,
- Sat: false,
- Sun: false },
- hours: { 0 => false,
- 1 => false,
- 2 => false,
- 3 => false,
- 4 => false,
- 5 => false,
- 6 => false,
- 7 => false,
- 8 => false,
- 9 => false,
- 10 => false,
- 11 => false,
- 12 => false,
- 13 => false,
- 14 => false,
- 15 => false,
- 16 => false,
- 17 => false,
- 18 => false,
- 19 => false,
- 20 => false,
- 21 => false,
- 22 => false,
- 23 => false },
- minutes: { 0 => false,
- 10 => false,
- 20 => false,
- 30 => false,
- 40 => false,
- 50 => false } }
- end
- end
- end
- end
|