Skip to content

Commit

Permalink
Add alias and PNC
Browse files Browse the repository at this point in the history
  • Loading branch information
vertism committed Dec 19, 2024
1 parent 06fd8ca commit 17eb1d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 2 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,9 @@ def request_additional_info
def context
super.merge(
addressee_location: data_request_area.location,
aliases: kase.subject_aliases,
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.
12 changes: 9 additions & 3 deletions spec/models/commissioning_document_template/standard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
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 +38,12 @@
let(:expected_context) do
{
addressee_location: "HMP halifax",
aliases: "Mr Blobby",
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 +78,12 @@
let(:expected_context) do
{
addressee_location: "HMP halifax",
aliases: "Mr Blobby",
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 +120,12 @@
let(:expected_context) do
{
addressee_location: "HMP halifax",
aliases: "Mr Blobby",
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 +291,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 17eb1d7

Please sign in to comment.