Skip to content

Update app/services/proforma_service/convert_exercise_to_task.rb #5459

Update app/services/proforma_service/convert_exercise_to_task.rb

Update app/services/proforma_service/convert_exercise_to_task.rb #5459

Triggered via push October 8, 2024 19:30
Status Failure
Total duration 11m 11s
Artifacts

ci.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

4 errors
test: spec/services/proforma_service/import_spec.rb#L132
ProformaService::Import#execute when exercise has multiple tests is expected to be an equal exercise as #<Exercise id: 4, description: "Dummy", execution_environment_id: 4, title: "Dummy", created_at: "202...", unpublished: false, submission_deadline: nil, late_submission_deadline: nil, internal_title: nil> Failure/Error: it { is_expected.to be_an_equal_exercise_as exercise } #<Exercise id: 4, description: "Dummy", execution_environment_id: 4, title: "Dummy", created_at: "2024-10-08 19:32:13.711747000 +0000", updated_at: "2024-10-08 19:32:13.721980000 +0000", user_id: 17, instructions: "instruction", public: false, user_type: "InternalUser", token: "55243750", hide_file_tree: true, allow_file_creation: false, allow_auto_completion: true, expected_difficulty: 7, uuid: "4b7970c4-d6b6-4390-b880-d9c0a49b1060", unpublished: false, submission_deadline: nil, late_submission_deadline: nil, internal_title: nil> is not equal to #<Exercise id: 4, description: "Dummy", execution_environment_id: 4, title: "Dummy", created_at: "2024-10-08 19:32:13.711747000 +0000", updated_at: "2024-10-08 19:32:13.721980000 +0000", user_id: 17, instructions: "instruction", public: false, user_type: "InternalUser", token: "55243750", hide_file_tree: true, allow_file_creation: false, allow_auto_completion: true, expected_difficulty: 7, uuid: "4b7970c4-d6b6-4390-b880-d9c0a49b1060", unpublished: false, submission_deadline: nil, late_submission_deadline: nil, internal_title: nil>. Last checked attribute: name: "524fe9a675139ad6911c5a34fc258605" vs "530eb379c73163aac1e2a3e9e6927a65"
test: spec/services/proforma_service/convert_exercise_to_task_spec.rb#L279
ProformaService::ConvertExerciseToTask#execute when exercise has a test creates a test with one file with correct attributes Failure/Error: expect(task.tests.first.files.first).to have_attributes( id: test_file.id, content: test_file.content, filename: test_file.name_with_extension, used_by_grader: true, visible: 'no', binary: false, internal_description: nil ) expected #<ProformaXML::TaskFile:0x00007fd86f392b38 @id="4558", @filename="18c59d6739fc4e1d5e130bea81036f2c.rb", @usage_by_lms="display", @visible="no", @content="", @used_by_grader=true, @binary=false> to have attributes {:binary => false, :content => "", :filename => "18c59d6739fc4e1d5e130bea81036f2c.rb", :id => 4558, :internal_description => nil, :used_by_grader => true, :visible => "no"} but had attributes {:binary => false, :content => "", :filename => "18c59d6739fc4e1d5e130bea81036f2c.rb", :id => "4558", :internal_description => nil, :used_by_grader => true, :visible => "no"} Diff: @@ -1,7 +1,7 @@ :binary => false, :content => "", :filename => "18c59d6739fc4e1d5e130bea81036f2c.rb", -:id => 4558, +:id => "4558", :internal_description => nil, :used_by_grader => true, :visible => "no",
test: spec/services/proforma_service/convert_exercise_to_task_spec.rb#L216
ProformaService::ConvertExerciseToTask#execute when exercise has a file with role reference implementation creates a model-solution with one file with correct attributes Failure/Error: expect(task.model_solutions.first.files.first).to have_attributes( id: file.id, content: file.content, filename: file.name_with_extension, used_by_grader: false, usage_by_lms: 'display', visible: 'yes', binary: false, internal_description: nil ) expected #<ProformaXML::TaskFile:0x00007fd86f9dd178 @id="4568", @filename="dfaca19c2bdf714fa1b0f843cd33ebea.rb", @usage_by_lms="display", @visible="yes", @content="", @used_by_grader=false, @binary=false> to have attributes {:binary => false, :content => "", :filename => "dfaca19c2bdf714fa1b0f843cd33ebea.rb", :id => 4568, :internal_description => nil, :usage_by_lms => "display", :used_by_grader => false, :visible => "yes"} but had attributes {:binary => false, :content => "", :filename => "dfaca19c2bdf714fa1b0f843cd33ebea.rb", :id => "4568", :internal_description => nil, :usage_by_lms => "display", :used_by_grader => false, :visible => "yes"} Diff: @@ -1,7 +1,7 @@ :binary => false, :content => "", :filename => "dfaca19c2bdf714fa1b0f843cd33ebea.rb", -:id => 4568, +:id => "4568", :internal_description => nil, :usage_by_lms => "display", :used_by_grader => false,
test
Process completed with exit code 1.