Fix in models/exercise_spec.rb, repair average_percentage without submission
This commit is contained in:
@ -121,7 +121,7 @@ describe ExecutionEnvironment do
|
||||
|
||||
describe '#working_docker_image?', docker: true do
|
||||
let(:working_docker_image?) { execution_environment.send(:working_docker_image?) }
|
||||
before(:each) { expect(DockerClient).to receive(:find_image_by_tag).and_return(Object.new) }
|
||||
before(:each) { expect(DockerClient).to receive(:find_image_by_tag) }
|
||||
|
||||
it 'instantiates a Docker client' do
|
||||
expect(DockerClient).to receive(:new).with(execution_environment: execution_environment).and_call_original
|
||||
|
@ -50,7 +50,7 @@ describe Exercise do
|
||||
|
||||
context 'without submissions' do
|
||||
it 'returns nil' do
|
||||
expect(exercise.average_percentage).to be nil
|
||||
expect(exercise.average_percentage).to be 0
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user