Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ap 5097 convert apostrophes ccms payload #6881

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ap-5097: test special characters in applicant_add_requestor
kmahern authored and colinbruce committed Aug 5, 2024
commit 4eea0b7928e5123e92533981b79acd88aed5f6e7
25 changes: 25 additions & 0 deletions spec/services/ccms/requestors/applicant_add_requestor_spec.rb
Original file line number Diff line number Diff line change
@@ -133,6 +133,31 @@ module Requestors
)
end
end

context "when the applicant has a surname containing special characters" do
before do
applicant.update!(last_name: "O’‘Hare")
end

it "generates the expected XML" do
allow(requestor).to receive(:transaction_request_id).and_return(expected_tx_id)
expect(requestor.formatted_xml).to be_soap_envelope_with(
command: "clientbim:ClientAddRQ",
transaction_id: expected_tx_id,
matching: [
"<common:Surname>O''Hare</common:Surname>",
"<common:SurnameAtBirth>O''Hare</common:SurnameAtBirth>",
"<clientbio:NINumber>QQ123456Q</clientbio:NINumber>",
"<common:AddressLine1>102 Petty France</common:AddressLine1>",
"<common:AddressLine2>St James Park</common:AddressLine2>",
"<common:City>London</common:City>",
"<common:County>Westminster</common:County>",
"<common:Country>GBR</common:Country>",
"<common:PostalCode>SW1H 9AJ</common:PostalCode>",
],
)
end
end
end

describe "#transaction_request_id" do