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

mail_handler_spec: add_work_package_attachments instead of edit WP

Richard "Virgo" Richter14731b63cd96
diff --git a/spec/models/mail_handler_spec.rb b/spec/models/mail_handler_spec.rb
index 6e091238b84..4968ca5ced6 100644
--- a/spec/models/mail_handler_spec.rb
+++ b/spec/models/mail_handler_spec.rb
@@ -330,9 +330,8 @@ RSpec.describe MailHandler do
end
shared_context 'with a new work package with attachment' do
- # The edit_work_packages is currently wrongfully needed as the work package
- # is created first and only then the attachment is added.
- let(:permissions) { %i[add_work_packages edit_work_packages] }
+ # The work package is created first and only then the attachment is added.
+ let(:permissions) { %i[add_work_packages add_work_package_attachments] }
let!(:user) do
create(:user,
@@ -348,9 +347,8 @@ RSpec.describe MailHandler do
end
shared_context 'with a new work package with attachment in apple format' do
- # The edit_work_packages is currently wrongfully needed as the work package
- # is created first and only then the attachment is added.
- let(:permissions) { %i[add_work_packages edit_work_packages] }
+ # The work package is created first and only then the attachment is added.
+ let(:permissions) { %i[add_work_packages add_work_package_attachments] }
let!(:user) do
create(:user,