mail_handler_spec: add_work_package_attachments instead of edit WP

Some tests used edit_work_packages to allow adding attachments, which
can now be done with add_work_package_attachments.
This commit is contained in:
Richard "Virgo" Richter
2023-11-13 08:32:29 +00:00
parent 7a2a694906
commit 14731b63cd
+4 -6
View File
@@ -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,
mail: 'JSmith@somenet.foo',
@@ -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,
mail: 'JSmith@somenet.foo',