Merge branch 'master' into add_roles_via_LTI

# Conflicts:
#	app/views/application/_breadcrumbs.html.slim
#	app/views/application/welcome.html.slim
#	app/views/exercise_collections/show.html.slim
#	app/views/external_users/index.html.slim
#	app/views/layouts/application.html.slim
#	app/views/proxy_exercises/index.html.slim
#	app/views/user_exercise_feedbacks/index.html.slim
#	app/views/user_mailer/send_thank_you_note.slim
This commit is contained in:
Sebastian Serth
2018-12-14 00:53:06 +01:00
47 changed files with 256 additions and 120 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -1,5 +1,6 @@
FactoryBot.define do
factory :proxy_exercise, class: ProxyExercise do
created_by_teacher
token { 'dummytoken' }
title { 'Dummy' }
end

View File

@@ -38,8 +38,8 @@ describe 'Authentication' do
visit(root_path)
end
it "displays the user's name" do
expect(page).to have_content(user.name)
it "displays the user's displayname" do
expect(page).to have_content(user.displayname)
end
it 'displays a sign out link' do

View File

@@ -10,6 +10,7 @@ describe 'exercises/implement.html.slim' do
assign(:exercise, exercise)
assign(:files, files)
assign(:paths, [])
assign(:embed_options, {})
render
end