Merge pull request #656 from sgmap/fix-warnings

Fix warnings
This commit is contained in:
Mathieu Magnin 2017-08-25 10:34:09 +02:00 committed by GitHub
commit d05e73181d
2 changed files with 6 additions and 6 deletions

View file

@ -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
is_expected.to redirect_to backoffice_dossier_path(id: dossier.id)
end
end
it { is_expected.to redirect_to backoffice_dossier_path(id: dossier.id) }
end
end
end

View file

@ -7,8 +7,8 @@ describe ClamavService do
subject { ClamavService.safe_file? path_file }
before do
allow_any_instance_of(ClamAV::Client).to receive(:initialize).and_return(ClamAV::Client)
allow_any_instance_of(ClamAV::Client).to receive(:execute).and_return([ClamAV::SuccessResponse])
client = instance_double("ClamAV::Client", :execute => [ClamAV::SuccessResponse])
allow(ClamAV::Client).to receive(:new).and_return(client)
end
it 'change permission of file path' do