OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/spec/factories/notification_factory.rb

19 lines
537 B

FactoryBot.define do
factory :notification do
subject { "MyText" }
read_ian { false }
mail_reminder_sent { false }
mail_alert_sent { false }
reason { :mentioned }
recipient factory: :user
project { association :project }
resource { association :work_package, project: }
actor { nil }
journal { nil }
callback(:after_build) do |notification, _|
notification.journal ||= notification.resource.journals.last
notification.actor ||= notification.journal.try(:user)
end
end
end