preparations to replace session with lti_parameters object

This commit is contained in:
Tom Staubitz
2016-12-27 00:13:41 +01:00
parent 2b55e0081c
commit f4c01879bf
12 changed files with 23 additions and 27 deletions

View File

@ -116,6 +116,7 @@ describe Lti do
context 'with an valid score' do
context 'with a tool provider' do
before(:each) do
#Todo replace session with lti_parameter
controller.session[:consumer_id] = consumer.id
controller.session[:lti_parameters] = {}
end

View File

@ -4,6 +4,7 @@ describe ApplicationController do
describe '#current_user' do
context 'with an external user' do
let(:external_user) { FactoryGirl.create(:external_user) }
#Todo replace session with lti_parameter
before(:each) { session[:external_user_id] = external_user.id }
it 'returns the external user' do

View File

@ -78,6 +78,7 @@ describe SessionsController do
it 'assigns the current user' do
request
expect(assigns(:current_user)).to be_an(ExternalUser)
#Todo replace session with lti_parameter
expect(session[:external_user_id]).to eq(user.id)
end
@ -174,6 +175,7 @@ describe SessionsController do
let(:submission) { FactoryGirl.create(:submission, exercise: FactoryGirl.create(:dummy)) }
before(:each) do
#Todo replace session with lti_parameter
session[:consumer_id] = consumer.id
session[:lti_parameters] = {}
end

View File

@ -32,7 +32,7 @@ FactoryGirl.define do
factory :java, class: ExecutionEnvironment do
created_by_teacher
default_memory_limit
docker_image 'hklement/ubuntu-java:latest'
docker_image 'openhpi/co_execenv_java:latest'
association :file_type, factory: :dot_java
help
name 'Java 8'
@ -78,7 +78,7 @@ FactoryGirl.define do
factory :python, class: ExecutionEnvironment do
created_by_teacher
default_memory_limit
docker_image 'hklement/ubuntu-python:latest'
docker_image 'openhpi/co_execenv_python:latest'
association :file_type, factory: :dot_py
help
name 'Python 3.4'