OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix reason and journal init after merging from dev
Oliver Güntherfe3839d8cc15
diff --git a/spec/factories/notification_factory.rb b/spec/factories/notification_factory.rbindex 32fada51a40..c7ec7f97b1c 100644--- a/spec/factories/notification_factory.rb+++ b/spec/factories/notification_factory.rb@@ -8,12 +8,15 @@ FactoryBot.define dorecipient factory: :userproject { association :project }resource { association :work_package, project: project }- actor { journal.try(:user) }+ actor { nil }- transient { journal }+ transient do+ journal { nil }+ endcallback(:after_create) do |notification, evaluator|- notification.journal = evaluator.journal || notification.work_package.journals.last+ notification.journal = evaluator.journal || notification.resource.journals.last+ notification.actor ||= notification.journal.try(:user)notification.save!endenddiff --git a/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rb b/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rbindex da4d96df7ea..f607e385a49 100644--- a/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rb+++ b/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rb@@ -22,7 +22,7 @@ describe "Notification center sidemenu", type: :feature, js: true dorecipient: recipient,project: project,resource: work_package,- reason_ian: :watched+ reason: :watchedendlet!(:notification2) do@@ -30,7 +30,7 @@ describe "Notification center sidemenu", type: :feature, js: true dorecipient: recipient,project: project2,resource: work_package2,- reason_ian: :assigned+ reason: :assignedendlet!(:notification3) do@@ -38,7 +38,7 @@ describe "Notification center sidemenu", type: :feature, js: true dorecipient: recipient,project: project3,resource: work_package3,- reason_ian: :responsible+ reason: :responsibleendlet!(:notification4) do@@ -46,7 +46,7 @@ describe "Notification center sidemenu", type: :feature, js: true dorecipient: recipient,project: project3,resource: work_package4,- reason_ian: :mentioned+ reason: :mentionedendlet(:center) { ::Components::Notifications::Center.new }