demarches-normaliennes/spec/factories/virus_scan.rb
2019-02-21 16:00:33 +01:00

17 lines
415 B
Ruby

FactoryBot.define do
factory :virus_scan do
add_attribute(:status) { VirusScan.statuses.fetch(:pending) }
trait :pending do
add_attribute(:status) { VirusScan.statuses.fetch(:pending) }
end
trait :safe do
add_attribute(:status) { VirusScan.statuses.fetch(:safe) }
end
trait :infected do
add_attribute(:status) { VirusScan.statuses.fetch(:infected) }
end
end
end