Refactor a test to avoid logging a Sentry error message
This commit is contained in:
parent
2908a81a1b
commit
af91751e1e
1 changed files with 4 additions and 4 deletions
|
@ -333,8 +333,6 @@ describe Backoffice::DossiersController, type: :controller do
|
|||
end
|
||||
|
||||
context 'when the dossier has an attestation' do
|
||||
let(:emailable) { false }
|
||||
|
||||
before do
|
||||
attestation = Attestation.new
|
||||
allow(attestation).to receive(:pdf).and_return(double(read: 'pdf', size: 2.megabytes))
|
||||
|
@ -350,6 +348,8 @@ describe Backoffice::DossiersController, type: :controller do
|
|||
|
||||
it 'Notification email is sent with the attestation' do
|
||||
subject
|
||||
|
||||
is_expected.to redirect_to backoffice_dossier_path(id: dossier.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -361,10 +361,10 @@ describe Backoffice::DossiersController, type: :controller do
|
|||
expect(controller).to receive(:capture_message)
|
||||
|
||||
subject
|
||||
end
|
||||
end
|
||||
|
||||
it { is_expected.to redirect_to backoffice_dossier_path(id: dossier.id) }
|
||||
is_expected.to redirect_to backoffice_dossier_path(id: dossier.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue