Merge pull request #244 from openHPI/specify_embed_options
Implement support for some basic embed options for work sheets via LTI
This commit is contained in:
@ -19,6 +19,7 @@ describe Lti do
|
||||
it 'clears the session' do
|
||||
expect(controller.session).to receive(:delete).with(:consumer_id)
|
||||
expect(controller.session).to receive(:delete).with(:external_user_id)
|
||||
expect(controller.session).to receive(:delete).with(:embed_options)
|
||||
controller.send(:clear_lti_session_data)
|
||||
end
|
||||
end
|
||||
|
@ -186,7 +186,7 @@ describe SubmissionsController do
|
||||
end
|
||||
|
||||
it 'ends with a placeholder' do
|
||||
expect(url).to end_with(Submission::FILENAME_URL_PLACEHOLDER)
|
||||
expect(url).to end_with(Submission::FILENAME_URL_PLACEHOLDER + '.json')
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -196,7 +196,7 @@ describe SubmissionsController do
|
||||
let(:url) { JSON.parse(response.body).with_indifferent_access.fetch("#{action}_url") }
|
||||
|
||||
it "corresponds to the #{action} path" do
|
||||
expect(url).to eq(Rails.application.routes.url_helpers.send(:"#{action}_submission_path", submission))
|
||||
expect(url).to eq(Rails.application.routes.url_helpers.send(:"#{action}_submission_path", submission, format: :json))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -10,6 +10,7 @@ describe 'exercises/implement.html.slim' do
|
||||
assign(:exercise, exercise)
|
||||
assign(:files, files)
|
||||
assign(:paths, [])
|
||||
assign(:embed_options, {})
|
||||
render
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user