spec: clear deliveries before every example

This commit is contained in:
Pierre de La Morinerie 2018-11-06 17:05:23 +01:00
parent b94bc654c9
commit d4b2b04875
3 changed files with 2 additions and 7 deletions

View file

@ -73,9 +73,6 @@ feature 'The gestionnaire part' do
end
scenario 'A gestionnaire can use avis' do
ActionMailer::Base.deliveries = []
ActiveJob::Base.queue_adapter = :test
log_in(gestionnaire.email, password)
click_on procedure.libelle

View file

@ -600,10 +600,6 @@ describe Dossier do
let(:procedure) { create(:procedure) }
let(:user) { create(:user) }
before do
ActionMailer::Base.deliveries.clear
end
it "send an email when the dossier is created for the very first time" do
dossier = nil
ActiveJob::Base.queue_adapter = :test

View file

@ -137,6 +137,8 @@ RSpec.configure do |config|
Typhoeus::Expectation.clear
ActionMailer::Base.deliveries.clear
if Flipflop.remote_storage?
VCR.use_cassette("ovh_storage_init") do
CarrierWave.configure do |config|