submission controller spec - problem with Rails.logger.error

This commit is contained in:
yqbk
2016-06-14 16:07:44 +02:00
parent 4e5c3ba071
commit 195fd9c3f9
4 changed files with 7 additions and 3 deletions

View File

@ -200,6 +200,8 @@ describe SubmissionsController do
context 'when the container can be found' do
before(:each) do
#not sure where is a correct place for this call. Need to change structure of this test?
#expect(Rails.logger).to receive(:error).with(/error message/)
expect(Docker::Container).to receive(:get).and_return(CONTAINER)
request.call
end
@ -213,6 +215,7 @@ describe SubmissionsController do
context 'when the container cannot be found' do
before(:each) do
#expect(Rails.logger).to receive(:error).with(/error message/)
expect(Docker::Container).to receive(:get).and_raise(Docker::Error::NotFoundError)
request.call
end