scinote-web/spec/factories/user_system_notifications.rb

19 lines
509 B
Ruby
Raw Normal View History

# frozen_string_literal: true
FactoryBot.define do
factory :user_system_notification do
user
system_notification
trait :seen do
2019-09-12 23:21:48 +08:00
seen_at { Faker::Time.between(from: 3.days.ago, to: Date.today) }
end
trait :read do
2019-09-12 23:21:48 +08:00
read_at { Faker::Time.between(from: 3.days.ago, to: Date.today) }
end
trait :seen_and_read do
2019-09-12 23:21:48 +08:00
seen_at { Faker::Time.between(from: 3.days.ago, to: Date.today) }
read_at { Faker::Time.between(from: seen_at, to: Date.today) }
end
end
end