fixed tests

This commit is contained in:
Ralf Teusner
2015-04-27 17:58:44 +02:00
parent fd3d489bd4
commit c3a56e6429
2 changed files with 4 additions and 2 deletions

View File

@ -160,6 +160,7 @@ describe SubmissionsController do
end
it 'does not store the error' do
pending("no server sent events used right now")
expect(Error).not_to receive(:create)
end
end
@ -170,6 +171,7 @@ describe SubmissionsController do
end
it 'stores the error' do
pending("no server sent events used right now")
expect(Error).to receive(:create).with(execution_environment_id: submission.exercise.execution_environment_id, message: stderr)
end
end

View File

@ -54,7 +54,7 @@ describe Submission do
before(:each) { submission.score = nil }
it 'returns nil' do
expect(submission.normalized_score).to be nil
expect(submission.normalized_score).to be 0
end
end
end
@ -73,7 +73,7 @@ describe Submission do
before(:each) { submission.score = nil }
it 'returns nil' do
expect(submission.percentage).to be nil
expect(submission.percentage).to be 0
end
end
end