Sha256: 31d6568381d21d6152d925794d57f557da0c8a74439067fe37bb47f3fb97c0bb

Contents?: true

Size: 583 Bytes

Versions: 28

Compression:

Stored size: 583 Bytes

Contents

FactoryBot.define do
  factory :triggering, :class => ForemanTasks::Triggering do
    mode :immediate

    trait :future do
      time = Time.zone.now
      mode :future
      start_at time
      start_at_raw(time.strftime(ForemanTasks::Triggering::TIME_FORMAT))
    end

    trait :recurring do
      mode :recurring
      input_type :cronline
      cronline '* * * * *'
      after(:build) { |triggering| triggering.recurring_logic = build(:recurring_logic) }
    end

    trait :end_time_limited do
      end_time_limited true
      end_time(Time.zone.now + 60)
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
foreman-tasks-0.14.6 test/factories/triggering_factory.rb
foreman-tasks-0.15.5 test/factories/triggering_factory.rb
foreman-tasks-0.15.4 test/factories/triggering_factory.rb
foreman-tasks-0.15.3 test/factories/triggering_factory.rb
foreman-tasks-0.15.2 test/factories/triggering_factory.rb
foreman-tasks-0.15.1 test/factories/triggering_factory.rb
foreman-tasks-0.15.0 test/factories/triggering_factory.rb
foreman-tasks-0.14.5 test/factories/triggering_factory.rb
foreman-tasks-0.14.4 test/factories/triggering_factory.rb
foreman-tasks-0.14.3 test/factories/triggering_factory.rb
foreman-tasks-0.14.2 test/factories/triggering_factory.rb
foreman-tasks-0.14.1 test/factories/triggering_factory.rb
foreman-tasks-0.11.3 test/factories/triggering_factory.rb
foreman-tasks-0.14.0 test/factories/triggering_factory.rb
foreman-tasks-0.13.4 test/factories/triggering_factory.rb
foreman-tasks-0.13.3 test/factories/triggering_factory.rb
foreman-tasks-0.13.2 test/factories/triggering_factory.rb
foreman-tasks-0.13.1 test/factories/triggering_factory.rb
foreman-tasks-0.13.0 test/factories/triggering_factory.rb
foreman-tasks-0.12.2 test/factories/triggering_factory.rb