commit
d05e73181d
2 changed files with 6 additions and 6 deletions
|
@ -333,8 +333,6 @@ describe Backoffice::DossiersController, type: :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when the dossier has an attestation' do
|
context 'when the dossier has an attestation' do
|
||||||
let(:emailable) { false }
|
|
||||||
|
|
||||||
before do
|
before do
|
||||||
attestation = Attestation.new
|
attestation = Attestation.new
|
||||||
allow(attestation).to receive(:pdf).and_return(double(read: 'pdf', size: 2.megabytes))
|
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
|
it 'Notification email is sent with the attestation' do
|
||||||
subject
|
subject
|
||||||
|
|
||||||
|
is_expected.to redirect_to backoffice_dossier_path(id: dossier.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -361,10 +361,10 @@ describe Backoffice::DossiersController, type: :controller do
|
||||||
expect(controller).to receive(:capture_message)
|
expect(controller).to receive(:capture_message)
|
||||||
|
|
||||||
subject
|
subject
|
||||||
|
|
||||||
|
is_expected.to redirect_to backoffice_dossier_path(id: dossier.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to redirect_to backoffice_dossier_path(id: dossier.id) }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,8 +7,8 @@ describe ClamavService do
|
||||||
subject { ClamavService.safe_file? path_file }
|
subject { ClamavService.safe_file? path_file }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
allow_any_instance_of(ClamAV::Client).to receive(:initialize).and_return(ClamAV::Client)
|
client = instance_double("ClamAV::Client", :execute => [ClamAV::SuccessResponse])
|
||||||
allow_any_instance_of(ClamAV::Client).to receive(:execute).and_return([ClamAV::SuccessResponse])
|
allow(ClamAV::Client).to receive(:new).and_return(client)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'change permission of file path' do
|
it 'change permission of file path' do
|
||||||
|
|
Loading…
Reference in a new issue