Skip to content

Commit

Permalink
[Automated] Merged master into target preview_envs_k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
va-vsp-bot authored Mar 5, 2024
2 parents 5a4e5f4 + efbcc6f commit ca32df6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def icn
end

def first_party?
%w[VETERAN SURVIVING_DEPENDENT].include?(params[:preparer_identification])
params[:preparer_identification] == 'VETERAN'
end

def get_form_id
Expand Down
30 changes: 14 additions & 16 deletions modules/simple_forms_api/spec/requests/v1/uploads_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,20 @@
end

describe 'request with intent to file' do
describe 'veteran or surviving dependent' do
%w[VETERAN SURVIVING_DEPENDENT].each do |identification|
it 'makes the request with an intent to file' do
VCR.use_cassette('lighthouse/benefits_claims/intent_to_file/404_response') do
VCR.use_cassette('lighthouse/benefits_claims/intent_to_file/200_response_pension') do
VCR.use_cassette('lighthouse/benefits_claims/intent_to_file/200_response_survivor') do
VCR.use_cassette('lighthouse/benefits_claims/intent_to_file/create_compensation_200_response') do
fixture_path = Rails.root.join('modules', 'simple_forms_api', 'spec', 'fixtures', 'form_json',
'vba_21_0966-min.json')
data = JSON.parse(fixture_path.read)
data['preparer_identification'] = identification

post '/simple_forms_api/v1/simple_forms', params: data

expect(response).to have_http_status(:ok)
end
describe 'veteran' do
it 'makes the request with an intent to file' do
VCR.use_cassette('lighthouse/benefits_claims/intent_to_file/404_response') do
VCR.use_cassette('lighthouse/benefits_claims/intent_to_file/200_response_pension') do
VCR.use_cassette('lighthouse/benefits_claims/intent_to_file/200_response_survivor') do
VCR.use_cassette('lighthouse/benefits_claims/intent_to_file/create_compensation_200_response') do
fixture_path = Rails.root.join('modules', 'simple_forms_api', 'spec', 'fixtures', 'form_json',
'vba_21_0966-min.json')
data = JSON.parse(fixture_path.read)
data['preparer_identification'] = 'VETERAN'

post '/simple_forms_api/v1/simple_forms', params: data

expect(response).to have_http_status(:ok)
end
end
end
Expand Down

0 comments on commit ca32df6

Please sign in to comment.