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
rewrite test in a better way
Christophe Bliard6f5bb8f76225
diff --git a/spec/workers/notifications/group_member_altered_job_spec.rb b/spec/workers/notifications/group_member_altered_job_spec.rbindex e869a06ce5a..4773cee0dd0 100644--- a/spec/workers/notifications/group_member_altered_job_spec.rb+++ b/spec/workers/notifications/group_member_altered_job_spec.rb@@ -75,14 +75,13 @@ describe Notifications::GroupMemberAlteredJob, type: :model doendit 'propagates the given current user when sending notifications' do- notifications_called = false+ captured_current_user = nilallow(OpenProject::Notifications).to receive(:send) do |_args|- expect(User.current).to be(current_user)- notifications_called = true+ captured_current_user = User.currentendservice_call- expect(notifications_called).to be(true)+ expect(captured_current_user).to be(current_user)endend