diff --git a/spec/models/work_package/work_package_action_mailer_spec.rb b/spec/models/work_package/work_package_action_mailer_spec.rb index 22c6ebbf5d..c5b4703346 100644 --- a/spec/models/work_package/work_package_action_mailer_spec.rb +++ b/spec/models/work_package/work_package_action_mailer_spec.rb @@ -72,6 +72,8 @@ describe WorkPackage, type: :model do context 'no notification' do before do + ActionMailer::Base.deliveries.clear # clear mails sent due to prior WP creation + JournalManager.send_notification = false work_package.save! diff --git a/spec/requests/api/v3/work_package_resource_spec.rb b/spec/requests/api/v3/work_package_resource_spec.rb index 83df3ecd30..db8367c27a 100644 --- a/spec/requests/api/v3/work_package_resource_spec.rb +++ b/spec/requests/api/v3/work_package_resource_spec.rb @@ -269,6 +269,7 @@ h4. things we like before(:each) do allow(User).to receive(:current).and_return current_user work_package + ActionMailer::Base.deliveries.clear # throw away mails due to work package creation end include_context 'patch request'