scinote-web/spec/factories/user_system_notifications.rb
Urban Rotnik 3e2c9934d0 Add SystemNotification model
- SystemNotifiction model with spec
- UserSystemNotification model for many-many association
2019-01-29 11:40:26 +01:00

19 lines
454 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :user_system_notification do
user
system_notification
trait :seen do
seen { Faker::Time.between(3.days.ago, Date.today) }
end
trait :read do
read { Faker::Time.between(3.days.ago, Date.today) }
end
trait :seen_and_read do
seen { Faker::Time.between(3.days.ago, Date.today) }
read { Faker::Time.between(seen, Date.today) }
end
end
end