From bcbc8da7e3ee0c14a5db862c0f9bf5ffd86ade34 Mon Sep 17 00:00:00 2001
From: Jennica Stiehl <25069483+stiehlrod@users.noreply.github.com>
Date: Tue, 26 Mar 2024 15:32:01 -0600
Subject: [PATCH] Fixes cassette and call after refactor
---
.../lib/bgs_service/vnp_ptcpnt_service.rb | 6 +-
.../lib/claims_api/vnp_ptcpnt_service_spec.rb | 4 +-
.../vnp_ptcpnt_service.yml | 82 +++++++++----------
3 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/modules/claims_api/lib/bgs_service/vnp_ptcpnt_service.rb b/modules/claims_api/lib/bgs_service/vnp_ptcpnt_service.rb
index 24f4eb04694..95fab628a31 100644
--- a/modules/claims_api/lib/bgs_service/vnp_ptcpnt_service.rb
+++ b/modules/claims_api/lib/bgs_service/vnp_ptcpnt_service.rb
@@ -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:,
@@ -19,7 +19,7 @@ def convert_nil_values(options)
arg_strg = ''
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 += ''
end
diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_service_spec.rb
index ac50b6371cf..264c3bd2186 100644
--- a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_service_spec.rb
+++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_service_spec.rb
@@ -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'
@@ -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',
diff --git a/spec/support/vcr_cassettes/bgs/vnp_proc_service_v2/vnp_ptcpnt_service.yml b/spec/support/vcr_cassettes/bgs/vnp_proc_service_v2/vnp_ptcpnt_service.yml
index a905e90eb8e..99ef5d1d03a 100644
--- a/spec/support/vcr_cassettes/bgs/vnp_proc_service_v2/vnp_ptcpnt_service.yml
+++ b/spec/support/vcr_cassettes/bgs/vnp_proc_service_v2/vnp_ptcpnt_service.yml
@@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
- uri: https://internal-dsva-vagov-dev-fwdproxy-1893365470.us-gov-west-1.elb.amazonaws.com:4447/VnpPtcpntWebServiceBean/VnpPtcpntService?WSDL
+ uri: https://localhost:4447/VnpPtcpntWebServiceBean/VnpPtcpntService?WSDL
body:
encoding: US-ASCII
string: ''
@@ -19,7 +19,7 @@ http_interactions:
message: OK
headers:
Date:
- - Tue, 26 Mar 2024 19:13:14 GMT
+ - Tue, 26 Mar 2024 21:28:36 GMT
Server:
- Apache
X-Frame-Options:
@@ -39,21 +39,15 @@ http_interactions:
-
-
-
-
-
-
-
-
-
+
+
+
@@ -66,6 +60,12 @@ http_interactions:
+
+
+
+
+
+
@@ -73,11 +73,6 @@ http_interactions:
-
-
-
-
-
@@ -93,6 +88,11 @@ http_interactions:
+
+
+
+
+
@@ -101,7 +101,7 @@ http_interactions:
-
+
@@ -113,7 +113,7 @@ http_interactions:
-
+
@@ -125,7 +125,7 @@ http_interactions:
-
+
@@ -137,7 +137,7 @@ http_interactions:
-
+
@@ -168,10 +168,10 @@ http_interactions:
- recorded_at: Tue, 26 Mar 2024 19:13:14 GMT
+ recorded_at: Tue, 26 Mar 2024 21:28:36 GMT
- request:
method: post
- uri: https://internal-dsva-vagov-dev-fwdproxy-1893365470.us-gov-west-1.elb.amazonaws.com:4447/VnpPtcpntWebServiceBean/VnpPtcpntService
+ uri: https://localhost:4447/VnpPtcpntWebServiceBean/VnpPtcpntService
body:
encoding: UTF-8
string: |
@@ -195,22 +195,22 @@ http_interactions:
-
- 3854437
-
- 2020-07-16T18:20:17Z
- 281
- VAgovAPI
- U
- VAgovAPI
-
-
-
- Person
-
-
-
-
+ 3854437
+
+
+ 2020-07-16T18:20:17Z
+ 281
+ VAgovAPI
+ U
+ VAgovAPI
+
+
+
+ Person
+
+
+
+
@@ -235,7 +235,7 @@ http_interactions:
message: OK
headers:
Date:
- - Tue, 26 Mar 2024 19:13:14 GMT
+ - Tue, 26 Mar 2024 21:28:37 GMT
Server:
- Apache
X-Frame-Options:
@@ -251,6 +251,6 @@ http_interactions:
string: rO0ABXdKABR3ZWJsb2dpYy5hcHAudm5wLWVhcgAAANYAAAAjd2VibG9naWMud29ya2FyZWEuU3RyaW5nV29ya0NvbnRleHQABTIuMC44AAA=18191138544372020-07-16T18:20:17Z281VAgovAPIUVAgovAPIPerson
- recorded_at: Tue, 26 Mar 2024 19:13:15 GMT
+ xmlns:ns0="http://ptcpntService.services.vonapp.vba.va.gov/">18191338544372020-07-16T18:20:17Z281VAgovAPIUVAgovAPIPerson
+ recorded_at: Tue, 26 Mar 2024 21:28:37 GMT
recorded_with: VCR 6.2.0