mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-25 17:36:14 +08:00
3e2c9934d0
- SystemNotifiction model with spec - UserSystemNotification model for many-many association
19 lines
454 B
Ruby
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
|