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

added BRD intake-sites test #16071

Merged
merged 5 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
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 @@ -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
Loading