diff --git a/app/view_objects/teacher_interface/application_form_view_object.rb b/app/view_objects/teacher_interface/application_form_view_object.rb index f1740a8db1..46c87d7339 100644 --- a/app/view_objects/teacher_interface/application_form_view_object.rb +++ b/app/view_objects/teacher_interface/application_form_view_object.rb @@ -104,7 +104,7 @@ def declined_reasons reasons = {} if (note = assessment&.recommendation_assessor_note).present? - reasons.merge!({ "" => [note] }) + reasons.merge!({ "" => [{ name: note }] }) end if assessment.present? && further_information_request.nil? diff --git a/spec/view_objects/teacher_interface/application_form_view_object_spec.rb b/spec/view_objects/teacher_interface/application_form_view_object_spec.rb index 547b3e14a0..bca22ce0eb 100644 --- a/spec/view_objects/teacher_interface/application_form_view_object_spec.rb +++ b/spec/view_objects/teacher_interface/application_form_view_object_spec.rb @@ -268,7 +268,7 @@ context "with a recommendation note" do before { assessment.update!(recommendation_assessor_note: "A note.") } - it { is_expected.to eq({ "" => ["A note."] }) } + it { is_expected.to eq({ "" => [{ name: "A note." }] }) } end context "with failure reasons" do