Apply manual rubocop fixes

This commit is contained in:
Sebastian Serth
2021-05-14 11:07:11 +02:00
parent 6cbecb5b39
commit da0a682ffb
109 changed files with 431 additions and 416 deletions

View File

@ -16,7 +16,7 @@ module CodeOcean
trait(:image) do
association :file_type, factory: :dot_png
name { 'poster' }
native_file { Rack::Test::UploadedFile.new(Rails.root.join('db', 'seeds', 'audio_video', 'poster.png'), 'image/png') }
native_file { Rack::Test::UploadedFile.new(Rails.root.join('db/seeds/audio_video/poster.png'), 'image/png') }
end
end

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
FactoryBot.define do
LTI_PARAMETERS = {
lti_params = {
lis_result_sourcedid: 'c2db0c7c-4411-4b27-a52b-ddfc3dc32065',
lis_outcome_service_url: 'http://172.16.54.235:3000/courses/0132156a-9afb-434d-83cc-704780104105/sections/21c6c6f4-1fb6-43b4-af3c-04fdc098879e/items/999b1fe6-d4b6-47b7-a577-ea2b4b1041ec/tool_grading',
launch_presentation_return_url: 'http://172.16.54.235:3000/courses/0132156a-9afb-434d-83cc-704780104105/sections/21c6c6f4-1fb6-43b4-af3c-04fdc098879e/items/999b1fe6-d4b6-47b7-a577-ea2b4b1041ec/tool_return',
@ -12,10 +12,10 @@ FactoryBot.define do
association :exercise, factory: :math
association :external_user
lti_parameters { LTI_PARAMETERS }
lti_parameters { lti_params }
trait :without_outcome_service_url do
lti_parameters { LTI_PARAMETERS.except(:lis_outcome_service_url) }
lti_parameters { lti_params.except(:lis_outcome_service_url) }
end
end
end