Skip to content
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@

expect(result.success?).to eq(true)
end

it 'sends state id jurisdiction to AAMVA' do
applicant.state_id_data.state_id_jurisdiction = 'NY'
expect(
Nokogiri::XML(subject.body) do |config|
config.strict
end.text,
).to match(/NY/)
Comment on lines +109 to +113
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the goal of using an XML parser was likely also to navigate the XML struscture, so I'd recommend more like:

Suggested change
expect(
Nokogiri::XML(subject.body) do |config|
config.strict
end.text,
).to match(/NY/)
doc = Nokogiri::XML(subject.body) { |config| config.strict }
message_destination = doc.at_css('MessageDestinationId')
expect(message_destination.text).to eq('NY')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, I merged my PR before seeing your comment. I'd modeled the change on the example you linked, which used match. Oops.

end
end

# rubocop:disable Layout/LineLength
Expand Down