Skip to content

Commit

Permalink
Update decline reasons with recommendation note
Browse files Browse the repository at this point in the history
This adds to 19c45fe to make sure that
any declined reasons coming from recommendation notes are handled
correctly.
  • Loading branch information
thomasleese committed Feb 14, 2024
1 parent faaad35 commit e5e785b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e5e785b

Please sign in to comment.