Skip to content

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

Add Mail delivery expectations on `share_spec`

Aaron Contreras1571aa28c2bd
diff --git a/spec/features/work_packages/share_spec.rb b/spec/features/work_packages/share_spec.rb
index 78c561dd0e9..c585dcf39e2 100644
--- a/spec/features/work_packages/share_spec.rb
+++ b/spec/features/work_packages/share_spec.rb
@@ -112,6 +112,10 @@ RSpec.describe 'Work package sharing',
share_modal.invite_user(not_shared_yet_with_user, 'Edit')
share_modal.expect_shared_with(not_shared_yet_with_user, 'Edit')
+
+ # Sent out email only on first share and not again when updating
+ perform_enqueued_jobs
+ expect(ActionMailer::Base.deliveries.size).to eq(1)
end
end