Skip to content

Commit

Permalink
CDPT-2377, CDPT-2378 Add alias and PNC to Standard commissioning docu…
Browse files Browse the repository at this point in the history
…ment (#2532)
  • Loading branch information
vertism authored Dec 20, 2024
1 parent 5a72889 commit 4184850
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/models/commissioning_document_template/standard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ def request_additional_info
def context
super.merge(
addressee_location: data_request_area.location,
aliases: kase.subject_aliases,
crn: kase.case_reference_number,
deadline:,
pnc: kase.other_subject_ids,
request_info:,
requests:,
request_additional_info:,
Expand Down
Binary file modified lib/assets/standard.docx
Binary file not shown.
16 changes: 13 additions & 3 deletions spec/models/commissioning_document_template/standard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@

let(:kase) do
build_stubbed(:offender_sar_case,
case_reference_number: "CRN999",
number: "20062007",
subject_full_name: "Robert Badson",
date_of_birth: "2000-03-11",
prison_number: "AB12345")
prison_number: "AB12345",
subject_aliases: "Mr Blobby",
other_subject_ids: "XYZ98765")
end

let(:data_request) do
Expand Down Expand Up @@ -36,10 +39,13 @@
let(:expected_context) do
{
addressee_location: "HMP halifax",
aliases: "Mr Blobby",
crn: "CRN999",
dpa_reference: "20062007",
offender_name: "Robert Badson",
date_of_birth: "11/03/2000",
date: "21/10/2022",
pnc: "XYZ98765",
prison_numbers: "AB12345",
deadline: "26/10/2022",
request_info: [
Expand Down Expand Up @@ -74,10 +80,13 @@
let(:expected_context) do
{
addressee_location: "HMP halifax",
aliases: "Mr Blobby",
crn: "CRN999",
dpa_reference: "20062007",
offender_name: "Robert Badson",
date_of_birth: "11/03/2000",
date: "21/10/2022",
pnc: "XYZ98765",
prison_numbers: "AB12345",
deadline: "26/10/2022",
request_info: [
Expand Down Expand Up @@ -114,10 +123,13 @@
let(:expected_context) do
{
addressee_location: "HMP halifax",
aliases: "Mr Blobby",
crn: "CRN999",
dpa_reference: "20062007",
offender_name: "Robert Badson",
date_of_birth: "11/03/2000",
date: "21/10/2022",
pnc: "XYZ98765",
prison_numbers: "AB12345",
deadline: "26/10/2022",
request_info: [
Expand Down Expand Up @@ -283,8 +295,6 @@

it "returns the correct additional info for each request_type" do
expected_info = "When providing the footage please supply an up-to-date photograph of the data subject and confirm the data you are sending us contains that same person. We cannot proceed without you verifying this.\nIf you have access to a Teams channel, please send the footage in MP4 format where possible.\n\nIf you have a transcript, please send this at the same time as the audio calls. If you do not have one we do not require you to create one.\n"
puts expected_info
puts template.request_additional_info
expect(template.request_additional_info).to eq(expected_info)
end
end
Expand Down

0 comments on commit 4184850

Please sign in to comment.