Skip to content

Commit

Permalink
added BRD intake-sites test (#16071)
Browse files Browse the repository at this point in the history
* added BRD intake-sites test

* test fix
  • Loading branch information
sethdarragile6 authored Mar 25, 2024
1 parent 3a83f6c commit 81ee32a
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

describe '#get_data' do
it 'gets data from lighthouse when valid path end-point is provided' do
VCR.use_cassette('lighthouse/benefits_reference_data/200_response') do
VCR.use_cassette('lighthouse/benefits_reference_data/200_disabilities_response') do
get(:get_data, params: { path: 'disabilities' })
end
expect(response.status).to eq(200)
Expand Down
17 changes: 14 additions & 3 deletions spec/requests/swagger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,7 @@
# TODO: remove Flipper feature toggle when lighthouse provider is implemented
Flipper.disable('disability_compensation_lighthouse_rated_disabilities_provider_foreground')
Flipper.disable('disability_compensation_prevent_submission_job')
Flipper.disable(ApiProviderFactory::FEATURE_TOGGLE_BRD)
end

let(:form526v2) do
Expand Down Expand Up @@ -1029,7 +1030,6 @@
end

it 'supports getting separation_locations' do
Flipper.disable(ApiProviderFactory::FEATURE_TOGGLE_BRD)
expect(subject).to validate(:get, '/v0/disability_compensation_form/separation_locations', 401)
VCR.use_cassette('evss/reference_data/get_intake_sites_500') do
expect(subject).to validate(:get, '/v0/disability_compensation_form/separation_locations', 502, headers)
Expand Down Expand Up @@ -1881,8 +1881,8 @@
end

describe 'Lighthouse Benefits Reference Data' do
it 'gets data from endpoint' do
VCR.use_cassette('lighthouse/benefits_reference_data/200_response') do
it 'gets disabilities data from endpoint' do
VCR.use_cassette('lighthouse/benefits_reference_data/200_disabilities_response') do
expect(subject).to validate(
:get,
'/v0/benefits_reference_data/{path}',
Expand All @@ -1891,6 +1891,17 @@
)
end
end

it 'gets intake-sites data from endpoint' do
VCR.use_cassette('lighthouse/benefits_reference_data/200_intake_sites_response') do
expect(subject).to validate(
:get,
'/v0/benefits_reference_data/{path}',
200,
headers.merge('path' => 'intake-sites')
)
end
end
end

describe 'appeals' do
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
http_interactions:
- request:
method: get
uri: https://sandbox-api.va.gov/services/benefits-reference-data/v1/intake-sites
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- Vets.gov Agent
Apikey:
- bad_key
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
response:
status:
code: 200
headers:
Date:
- Tue, 14 Apr 2020 17:55:43 GMT
Content-Type:
- application/json; charset=utf-8
Content-Length:
- '48'
Connection:
- keep-alive
Access-Control-Allow-Origin:
- "*"
Cache-Control:
- ''
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Set-Cookie:
- TS016f4012=01c8917e486328adc21ae638f4215bf74f2d91e2de452bfb4cc024f6f0f1a653d6e4f22d0b79aac369ae5e21f710b6bfdcc05f8d81;
Max-Age=900; Path=/
body:
encoding: UTF-8
string: '{
"totalItems": 0,
"totalPages": 0,
"links": [
{
"href": "https://sandbox-api.va.gov/services/benefits-reference-data/v1/intake-sites",
"rel": "self"
}
],
"items": [
{
"id": 5674661,
"description": "AF Academy"
}
]
}'
http_version: null
recorded_at: Mon, 25 Mar 2024 17:55:43 GMT
recorded_with: hand-made file, not recorded

0 comments on commit 81ee32a

Please sign in to comment.