-
Notifications
You must be signed in to change notification settings - Fork 13
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
NJ 271 - fix when review screen displays health insurance section #5457
Changes from 3 commits
8d0d43e
0103754
8d7e304
5fd9080
c560923
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe StateFile::Questions::NjReviewController do | ||
before do | ||
sign_in intake | ||
end | ||
|
||
describe "#edit" do | ||
render_views | ||
context 'when no dependents' do | ||
let(:intake) { create :state_file_nj_intake, :df_data_no_deps } | ||
|
||
it 'does not show the dependents without health insurance block' do | ||
allow_any_instance_of(StateFileNjIntake).to receive(:has_health_insurance_requirement_exception?).and_return false | ||
get :edit | ||
expect(response.body).not_to have_text "Dependents who DO NOT have health insurance" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [pebble] - I think if we have this test, we should pair it with a test case for the opposite when we do expect the text |
||
end | ||
end | ||
|
||
context 'when taxpayer has dependents' do | ||
let(:intake) { create :state_file_nj_intake, :df_data_qss } | ||
context 'when taxpayer does not have health insurance exception' do | ||
it 'does not show the dependents without health insurance block' do | ||
allow_any_instance_of(StateFileNjIntake).to receive(:has_health_insurance_requirement_exception?).and_return false | ||
get :edit | ||
expect(response.body).not_to have_text "Dependents who DO NOT have health insurance" | ||
end | ||
end | ||
|
||
context 'when taxpayer does have health insurance exception' do | ||
it 'shows the dependents without health insurance block' do | ||
allow_any_instance_of(StateFileNjIntake).to receive(:has_health_insurance_requirement_exception?).and_return true | ||
get :edit | ||
expect(response.body).to have_text "Dependents who DO NOT have health insurance" | ||
end | ||
end | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,14 +128,6 @@ | |
|
||
after(:build) do |intake, evaluator| | ||
intake.municipality_code = "0101" | ||
numeric_status = { | ||
single: 1, | ||
married_filing_jointly: 2, | ||
married_filing_separately: 3, | ||
head_of_household: 4, | ||
qualifying_widow: 5, | ||
}[evaluator.filing_status.to_sym] || evaluator.filing_status | ||
intake.direct_file_data.filing_status = numeric_status | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code would always override filing status to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving this issue to a separate ticket: https://github.com/newjersey/affordability-pm/issues/279. Going to revert the logic for now, and use a persona with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for making that follow-up ticket! |
||
intake.direct_file_data.primary_ssn = evaluator.primary_ssn || intake.direct_file_data.primary_ssn | ||
intake.direct_file_data.spouse_ssn = evaluator.spouse_ssn || intake.direct_file_data.spouse_ssn | ||
intake.raw_direct_file_data = intake.direct_file_data.to_s | ||
|
@@ -178,6 +170,11 @@ | |
raw_direct_file_intake_data { StateFile::DirectFileApiResponseSampleService.new.read_json('nj_minimal') } | ||
end | ||
|
||
trait :df_data_no_deps do | ||
raw_direct_file_data { StateFile::DirectFileApiResponseSampleService.new.read_xml('nj_springsteen_mfj') } | ||
raw_direct_file_intake_data { StateFile::DirectFileApiResponseSampleService.new.read_json('nj_springsteen_mfj') } | ||
end | ||
|
||
trait :df_data_many_deps do | ||
raw_direct_file_data { StateFile::DirectFileApiResponseSampleService.new.read_xml('nj_zeus_many_deps') } | ||
raw_direct_file_intake_data { StateFile::DirectFileApiResponseSampleService.new.read_json('nj_zeus_many_deps') } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test case would never happen as someone with no exceptions and who answered no to the eligibility question would be screened out.
vita-min/app/models/state_file_nj_intake.rb
Line 188 in d02c901