Sha256: dc27902ebf2f9a92d4c6c609c0e338477878d5c5241fdef31b29cea198b26680

Contents?: true

Size: 570 Bytes

Versions: 12

Compression:

Stored size: 570 Bytes

Contents

FactoryBot.define do
  factory :compliance_log, :class => :log do
    result "fail"
    association :report
    level_id 1
    association :source
    association :message
  end

  factory :compliance_message, :class => :message do
    sequence(:value) { |n| "message#{n}" }
    after(:build) do |msg|
      msg.digest = Digest::SHA1.hexdigest(msg.value)
    end
  end

  factory :compliance_source, :class => :source do
    sequence(:value) { |n| "source#{n}" }
    after(:build) do |source|
      source.digest = Digest::SHA1.hexdigest(source.value)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
foreman_openscap-1.0.1 test/factories/compliance_log_factory.rb
foreman_openscap-1.0.0 test/factories/compliance_log_factory.rb
foreman_openscap-0.12.3 test/factories/compliance_log_factory.rb
foreman_openscap-0.11.5 test/factories/compliance_log_factory.rb
foreman_openscap-0.12.2 test/factories/compliance_log_factory.rb
foreman_openscap-0.12.1 test/factories/compliance_log_factory.rb
foreman_openscap-0.12.0 test/factories/compliance_log_factory.rb
foreman_openscap-0.11.4 test/factories/compliance_log_factory.rb
foreman_openscap-0.11.3 test/factories/compliance_log_factory.rb
foreman_openscap-0.11.2 test/factories/compliance_log_factory.rb
foreman_openscap-0.11.1 test/factories/compliance_log_factory.rb
foreman_openscap-0.11.0 test/factories/compliance_log_factory.rb