Add Ralf's comment to skipped tests

This commit is contained in:
Maximilian Grundke
2017-10-25 10:12:29 +02:00
parent ffe4f65628
commit 6d28f427d8

View File

@ -114,7 +114,7 @@ describe Lti do
context 'when grading is not supported' do context 'when grading is not supported' do
it 'returns a corresponding status' do it 'returns a corresponding status' do
skip('todo') skip('ralf: this does not work, since send_score pulls data from the database, which then returns an empty array. On this is called .first, which returns nil and lets the test fail. Before Toms changes, this was taken from the session, which could be mocked')
expect_any_instance_of(IMS::LTI::ToolProvider).to receive(:outcome_service?).and_return(false) expect_any_instance_of(IMS::LTI::ToolProvider).to receive(:outcome_service?).and_return(false)
expect(controller.send(:send_score, submission.exercise_id, score, submission.user_id)[:status]).to eq('unsupported') expect(controller.send(:send_score, submission.exercise_id, score, submission.user_id)[:status]).to eq('unsupported')
end end
@ -133,12 +133,12 @@ describe Lti do
end end
it 'sends the score' do it 'sends the score' do
skip('todo') skip('ralf: this does not work, since send_score pulls data from the database, which then returns an empty array. On this is called .first, which returns nil and lets the test fail. Before Toms changes, this was taken from the session, which could be mocked')
controller.send(:send_score, submission.exercise_id, score, submission.user_id) controller.send(:send_score, submission.exercise_id, score, submission.user_id)
end end
it 'returns code, message, and status' do it 'returns code, message, and status' do
skip('todo') skip('ralf: this does not work, since send_score pulls data from the database, which then returns an empty array. On this is called .first, which returns nil and lets the test fail. Before Toms changes, this was taken from the session, which could be mocked')
result = controller.send(:send_score, submission.exercise_id, score, submission.user_id) result = controller.send(:send_score, submission.exercise_id, score, submission.user_id)
expect(result[:code]).to eq(response.response_code) expect(result[:code]).to eq(response.response_code)
expect(result[:message]).to eq(response.body) expect(result[:message]).to eq(response.body)