Skip to content

Commit

Permalink
Fixes cassette and call after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
stiehlrod committed Mar 26, 2024
1 parent 651f501 commit bcbc8da
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 46 deletions.
6 changes: 3 additions & 3 deletions modules/claims_api/lib/bgs_service/vnp_ptcpnt_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ module ClaimsApi
class VnpPtcpntService < ClaimsApi::LocalBGS
# vnpPtcpntCreate - This service is used to create VONAPP participant information
def vnp_ptcpnt_create(options)
convert_nil_values(options)
arg_strg = convert_nil_values(options)
body = Nokogiri::XML::DocumentFragment.parse <<~EOXML
# {arg_strg}
#{arg_strg}
EOXML

make_request(endpoint: 'VnpPtcpntWebServiceBean/VnpPtcpntService', action: 'vnpPtcpntCreate', body:,
Expand All @@ -19,7 +19,7 @@ def convert_nil_values(options)
arg_strg = '<arg0>'
options.each do |option|
arg = option[0].to_s.camelize(:lower)
arg_strg += (option[1].nil? ? "<#{arg} xsi:nil=true/>" : "<#{arg}>#{option[1]}</#{arg}>")
arg_strg += (option[1].nil? ? "<#{arg} xsi:nil='true'/>" : "<#{arg}>#{option[1]}</#{arg}>")
end
arg_strg += '</arg0>'
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
options[:vnp_proc_id] = '3854437'
options[:vnp_ptcpnt_id] = nil
options[:fraud_ind] = nil
options[:jrn_dt] = Time.zone.now
options[:jrn_dt] = '2020-07-16T18:20:17Z'
options[:jrn_lctn_id] = 281
options[:jrn_obj_id] = 'VAgovAPI'
options[:jrn_status_type_cd] = 'U'
Expand All @@ -30,7 +30,7 @@
VCR.use_cassette('bgs/vnp_proc_service_v2/vnp_ptcpnt_service') do
response = subject.vnp_ptcpnt_create(options)
expect(response).to include(
{ vnp_ptcpnt_id: '181911',
{ vnp_ptcpnt_id: '181913',
vnp_proc_id: '3854437',
jrn_dt: '2020-07-16T18:20:17Z',
jrn_lctn_id: '281',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bcbc8da

Please sign in to comment.