Marked more locations that might require to be changed when we switch from session to LtiParameters Object

This commit is contained in:
Tom Staubitz
2016-12-27 07:48:59 +01:00
parent 80e3453395
commit 6f1d8b2d38
4 changed files with 7 additions and 1 deletions

View File

@ -17,6 +17,7 @@ describe Lti do
describe '#clear_lti_session_data' do
it 'clears the session' do
#Todo replace session with lti_parameter
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(:lti_parameters)
@ -163,11 +164,13 @@ describe Lti do
end
describe '#store_lti_session_data' do
#Todo replace session with lti_parameter
let(:parameters) { {} }
before(:each) { controller.instance_variable_set(:@current_user, FactoryGirl.create(:external_user)) }
after(:each) { controller.send(:store_lti_session_data, consumer: FactoryGirl.build(:consumer), parameters: parameters) }
it 'stores data in the session' do
#Todo replace session with lti_parameter
expect(controller.session).to receive(:[]=).with(:consumer_id, anything)
expect(controller.session).to receive(:[]=).with(:external_user_id, anything)
expect(controller.session).to receive(:[]=).with(:lti_parameters, kind_of(Hash))

View File

@ -94,6 +94,7 @@ describe SessionsController do
end
it 'stores LTI parameters in the session' do
#Todo replace session with lti_parameter
expect(controller).to receive(:store_lti_session_data)
request
end
@ -160,6 +161,7 @@ describe SessionsController do
end
it 'clears the session' do
#Todo replace session with lti_parameter
expect(controller).to receive(:clear_lti_session_data)
delete :destroy
end
@ -183,6 +185,7 @@ describe SessionsController do
before(:each) { request.call }
it 'clears the session' do
#Todo replace session with lti_parameter
expect(controller).to receive(:clear_lti_session_data)
request.call
end