Sha256: 2412a6a5d303aa8b619cafdeab5c35d778aea044533c320a24bdcd002b023b2d

Contents?: true

Size: 584 Bytes

Versions: 13

Compression:

Stored size: 584 Bytes

Contents

FactoryGirl.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

13 entries across 13 versions & 1 rubygems

Version Path
foreman-tasks-0.10.9 test/factories/triggering_factory.rb
foreman-tasks-0.10.4 test/factories/triggering_factory.rb
foreman-tasks-0.9.6 test/factories/triggering_factory.rb
foreman-tasks-0.10.3 test/factories/triggering_factory.rb
foreman-tasks-0.10.2 test/factories/triggering_factory.rb
foreman-tasks-0.10.1 test/factories/triggering_factory.rb
foreman-tasks-0.9.5 test/factories/triggering_factory.rb
foreman-tasks-0.10.0 test/factories/triggering_factory.rb
foreman-tasks-0.9.4 test/factories/triggering_factory.rb
foreman-tasks-0.9.3 test/factories/triggering_factory.rb
foreman-tasks-0.9.2 test/factories/triggering_factory.rb
foreman-tasks-0.9.1 test/factories/triggering_factory.rb
foreman-tasks-0.9.0 test/factories/triggering_factory.rb