2019-01-25 21:53:06 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :user_system_notification do
|
|
|
|
user
|
|
|
|
system_notification
|
|
|
|
trait :seen do
|
2019-02-19 18:08:59 +08:00
|
|
|
seen_at { Faker::Time.between(3.days.ago, Date.today) }
|
2019-01-25 21:53:06 +08:00
|
|
|
end
|
|
|
|
trait :read do
|
2019-02-19 18:08:59 +08:00
|
|
|
read_at { Faker::Time.between(3.days.ago, Date.today) }
|
2019-01-25 21:53:06 +08:00
|
|
|
end
|
|
|
|
trait :seen_and_read do
|
2019-02-19 18:08:59 +08:00
|
|
|
seen_at { Faker::Time.between(3.days.ago, Date.today) }
|
|
|
|
read_at { Faker::Time.between(seen_at, Date.today) }
|
2019-01-25 21:53:06 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|