Sha256: 9788a23aefdce9e51b5ff51b6bcbb419149772a0147015dcd8a9faa99f415756

Contents?: true

Size: 617 Bytes

Versions: 87

Compression:

Stored size: 617 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

87 entries across 87 versions & 1 rubygems

Version Path
foreman-tasks-2.0.2 test/factories/triggering_factory.rb
foreman-tasks-1.1.3 test/factories/triggering_factory.rb
foreman-tasks-1.1.2 test/factories/triggering_factory.rb
foreman-tasks-2.0.1 test/factories/triggering_factory.rb
foreman-tasks-2.0.0 test/factories/triggering_factory.rb
foreman-tasks-1.2.0 test/factories/triggering_factory.rb
foreman-tasks-1.1.1 test/factories/triggering_factory.rb
foreman-tasks-1.1.0 test/factories/triggering_factory.rb
foreman-tasks-0.17.6 test/factories/triggering_factory.rb
foreman-tasks-1.0.1 test/factories/triggering_factory.rb
foreman-tasks-1.0.0 test/factories/triggering_factory.rb
foreman-tasks-0.17.5 test/factories/triggering_factory.rb
foreman-tasks-0.17.4 test/factories/triggering_factory.rb
foreman-tasks-0.17.3 test/factories/triggering_factory.rb
foreman-tasks-0.17.2 test/factories/triggering_factory.rb
foreman-tasks-0.16.3 test/factories/triggering_factory.rb
foreman-tasks-0.17.1 test/factories/triggering_factory.rb
foreman-tasks-0.15.11 test/factories/triggering_factory.rb
foreman-tasks-0.16.2 test/factories/triggering_factory.rb
foreman-tasks-0.15.10 test/factories/triggering_factory.rb