change namespace to CodeOcean

This commit is contained in:
Karol
2021-12-06 20:23:30 +01:00
parent 2c7748ed12
commit ec49f91a08
6 changed files with 18 additions and 16 deletions

View File

@ -38,7 +38,7 @@ RSpec.describe ProformaService::ConvertExerciseToTask do
uuid: exercise.uuid,
language: described_class::DEFAULT_LANGUAGE,
meta_data: {
openHPI: {
CodeOcean: {
instructions: exercise.instructions,
},
},
@ -167,7 +167,7 @@ RSpec.describe ProformaService::ConvertExerciseToTask do
title: test_file.name,
files: have(1).item,
meta_data: {
openHPI: {
CodeOcean: {
'entry-point': test_file.filepath,
'feedback-message': 'feedback_message',
},

View File

@ -39,7 +39,7 @@ describe ProformaService::ConvertTaskToExercise do
parent_uuid: 'parent_uuid',
language: 'language',
meta_data: {
openHPI: {
CodeOcean: {
instructions: 'instructions',
},
},
@ -233,7 +233,7 @@ describe ProformaService::ConvertTaskToExercise do
test_type: 'test_type',
files: test_files,
meta_data: {
openHPI: {
CodeOcean: {
'feedback-message': 'feedback-message',
'testing-framework': 'testing-framework',
'testing-framework-version': 'testing-framework-version',
@ -278,7 +278,7 @@ describe ProformaService::ConvertTaskToExercise do
Proforma::Test.new(
files: test_files2,
meta_data: {
openHPI: {
CodeOcean: {
'feedback-message': 'feedback-message',
'testing-framework': 'testing-framework',
'testing-framework-version': 'testing-framework-version',
@ -324,7 +324,7 @@ describe ProformaService::ConvertTaskToExercise do
id: exercise.id,
title: task.title,
description: task.description,
instructions: task.meta_data[:openHPI][:instructions],
instructions: task.meta_data[:CodeOcean][:instructions],
execution_environment: exercise.execution_environment,
uuid: exercise.uuid,
user: exercise.user,
@ -360,7 +360,7 @@ describe ProformaService::ConvertTaskToExercise do
test_type: 'test_type',
files: test_files,
meta_data: {
openHPI: {
CodeOcean: {
'feedback-message': 'feedback-message',
'testing-framework': 'testing-framework',
'testing-framework-version': 'testing-framework-version',

View File

@ -30,7 +30,7 @@ describe ProformaService::ExportTask do
before do
allow(ProformaService::ConvertExerciseToTask).to receive(:call).with(exercise: exercise).and_return(task)
allow(Proforma::Exporter).to receive(:new).with(task: task, custom_namespaces: [{prefix: 'openHPI', uri: 'open.hpi.de'}]).and_return(exporter)
allow(Proforma::Exporter).to receive(:new).with(task: task, custom_namespaces: [{prefix: 'CodeOcean', uri: 'codeocean.openhpi.de'}]).and_return(exporter)
end
it do