-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NJ 271 - fix when review screen displays health insurance section (#5457
) * NJ 271 - fix when review screen displays health insurance section * Simplify display logic * Fix bug in intake that causes filing status to be incorrect * change no dependents persona to nj_lucky_single * forgot to add updated factory in last commit
- Loading branch information
Showing
4 changed files
with
41 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
spec/controllers/state_file/questions/nj_review_controller_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_box_14 } | ||
|
||
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 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 |