From e9031a38b1e00bc4c57c15985a018802330ff97b Mon Sep 17 00:00:00 2001 From: Jan Sandbrink Date: Thu, 24 Sep 2015 08:11:45 +0200 Subject: [PATCH] Reintroduce clear statements that were still neccessary --- spec/models/work_package/work_package_action_mailer_spec.rb | 2 ++ spec/requests/api/v3/work_package_resource_spec.rb | 1 + 2 files changed, 3 insertions(+) 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'