File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed
Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ def set_meta_data
9090 def set_extra_data
9191 submission_restrictions_node = @task_node . xpath ( 'xmlns:submission-restrictions' ) . first
9292 @task . submission_restrictions = convert_xml_node_to_json ( submission_restrictions_node ) unless submission_restrictions_node . nil?
93- external_resources_node = @task_node . xpath ( 'xmlns:external_resources ' ) . first
93+ external_resources_node = @task_node . xpath ( 'xmlns:external-resources ' ) . first
9494 @task . external_resources = convert_xml_node_to_json ( external_resources_node ) unless external_resources_node . nil?
9595 grading_hints_node = @task_node . xpath ( 'xmlns:grading-hints' ) . first
9696 @task . grading_hints = convert_xml_node_to_json ( grading_hints_node ) unless grading_hints_node . nil?
Original file line number Diff line number Diff line change 436436 end
437437 end
438438
439- context 'with external-resources ' do
439+ context 'with external_resources ' do
440440 subject ( :exporter ) { described_class . new ( task :, custom_namespaces : [ { prefix : 'foo' , uri : 'urn:custom:foobar' } ] ) }
441441
442442 let ( :task ) { build ( :task , :with_external_resources ) }
454454 end
455455 end
456456
457- context 'with grading-hints ' do
457+ context 'with grading_hints ' do
458458 let ( :task ) { build ( :task , :with_grading_hints ) }
459459
460460 it 'add grading-hints' do
Original file line number Diff line number Diff line change 9898 end
9999 end
100100
101+ context 'when task has submission_restrictions' do
102+ let ( :task ) { build ( :task , :with_submission_restrictions ) }
103+
104+ it 'successfully imports the task' do
105+ expect ( imported_task ) . to be_an_equal_task_as ref_task
106+ end
107+ end
108+
109+ context 'when task has external_resources' do
110+ let ( :task ) { build ( :task , :with_external_resources ) }
111+
112+ it 'successfully imports the task' do
113+ expect ( imported_task ) . to be_an_equal_task_as ref_task
114+ end
115+ end
116+
117+ context 'when task has grading_hints' do
118+ let ( :task ) { build ( :task , :with_grading_hints ) }
119+
120+ it 'successfully imports the task' do
121+ expect ( imported_task ) . to be_an_equal_task_as ref_task
122+ end
123+ end
124+
101125 context 'when task has an embedded text file' do
102126 let ( :task ) { build ( :task , :with_embedded_txt_file ) }
103127
You can’t perform that action at this time.
0 commit comments