|
62 | 62 | context "proof followup" do
|
63 | 63 | context "mfj filers" do
|
64 | 64 | let(:intake) { create :state_file_md_intake, :with_spouse }
|
65 |
| - |
66 |
| - it "has all followups when spouse is not senior" do |
67 |
| - intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 66), 1, 1)) |
68 |
| - intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
69 |
| - get :edit |
70 |
| - |
71 |
| - html = Nokogiri::HTML.parse(response.body) |
72 |
| - expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).to be_present |
73 |
| - expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).to be_present |
74 |
| - expect(html.at_css("input[data-follow-up='#both-disability-proof']")).to be_present |
75 |
| - end |
76 |
| - |
77 |
| - it "has all followups primary is not senior" do |
78 |
| - intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
79 |
| - intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 66), 1, 1)) |
80 |
| - get :edit |
81 |
| - |
82 |
| - html = Nokogiri::HTML.parse(response.body) |
83 |
| - expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).to be_present |
84 |
| - expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).to be_present |
85 |
| - expect(html.at_css("input[data-follow-up='#both-disability-proof']")).to be_present |
86 |
| - end |
87 |
| - |
88 |
| - it "has all followups when neither are senior" do |
89 |
| - intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
90 |
| - intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
91 |
| - get :edit |
92 |
| - |
93 |
| - html = Nokogiri::HTML.parse(response.body) |
94 |
| - expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).to be_present |
95 |
| - expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).to be_present |
96 |
| - expect(html.at_css("input[data-follow-up='#both-disability-proof']")).to be_present |
| 65 | + context "with an eligible 1099r" do |
| 66 | + let!(:state_file1099_r) { create :state_file1099_r, intake: intake } |
| 67 | + |
| 68 | + it "has all followups when spouse is not senior" do |
| 69 | + intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 66), 1, 1)) |
| 70 | + intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
| 71 | + get :edit |
| 72 | + |
| 73 | + html = Nokogiri::HTML.parse(response.body) |
| 74 | + expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).to be_present |
| 75 | + expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).to be_present |
| 76 | + expect(html.at_css("input[data-follow-up='#both-disability-proof']")).to be_present |
| 77 | + end |
| 78 | + |
| 79 | + it "has all followups primary is not senior" do |
| 80 | + intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
| 81 | + intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 66), 1, 1)) |
| 82 | + get :edit |
| 83 | + |
| 84 | + html = Nokogiri::HTML.parse(response.body) |
| 85 | + expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).to be_present |
| 86 | + expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).to be_present |
| 87 | + expect(html.at_css("input[data-follow-up='#both-disability-proof']")).to be_present |
| 88 | + end |
| 89 | + |
| 90 | + it "has all followups when neither are senior" do |
| 91 | + intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
| 92 | + intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
| 93 | + get :edit |
| 94 | + |
| 95 | + html = Nokogiri::HTML.parse(response.body) |
| 96 | + expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).to be_present |
| 97 | + expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).to be_present |
| 98 | + expect(html.at_css("input[data-follow-up='#both-disability-proof']")).to be_present |
| 99 | + end |
| 100 | + |
| 101 | + it "has no followup id when both are senior" do |
| 102 | + intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 66), 1, 1)) |
| 103 | + intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 66), 1, 1)) |
| 104 | + get :edit |
| 105 | + |
| 106 | + html = Nokogiri::HTML.parse(response.body) |
| 107 | + expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).not_to be_present |
| 108 | + expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).not_to be_present |
| 109 | + expect(html.at_css("input[data-follow-up='#both-disability-proof']")).not_to be_present |
| 110 | + end |
| 111 | + |
| 112 | + it "does not have the pension exclusion warning when follow ups are shown but filing status is mfj" do |
| 113 | + intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
| 114 | + intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
| 115 | + get :edit |
| 116 | + |
| 117 | + html = Nokogiri::HTML.parse(response.body) |
| 118 | + expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).to be_present |
| 119 | + expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).to be_present |
| 120 | + expect(html.at_css("input[data-follow-up='#both-disability-proof']")).to be_present |
| 121 | + expect(html.to_s).not_to include('data-follow-up="#disability-warning"') |
| 122 | + end |
97 | 123 | end
|
98 | 124 |
|
99 |
| - it "has no followup id when both are senior" do |
100 |
| - intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 66), 1, 1)) |
101 |
| - intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 66), 1, 1)) |
102 |
| - get :edit |
| 125 | + context "without an eligible 1099rs" do |
| 126 | + let!(:state_file1099_r) { create :state_file1099_r, intake: intake, taxable_amount: 0} |
103 | 127 |
|
104 |
| - html = Nokogiri::HTML.parse(response.body) |
105 |
| - expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).not_to be_present |
106 |
| - expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).not_to be_present |
107 |
| - expect(html.at_css("input[data-follow-up='#both-disability-proof']")).not_to be_present |
108 |
| - end |
| 128 | + it "has no followups when neither are senior" do |
| 129 | + intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
| 130 | + intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
| 131 | + get :edit |
109 | 132 |
|
110 |
| - it "does not have the pension exclusion warning when follow ups are shown but filing status is mfj" do |
111 |
| - intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
112 |
| - intake.update(spouse_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
113 |
| - get :edit |
114 |
| - |
115 |
| - html = Nokogiri::HTML.parse(response.body) |
116 |
| - expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).to be_present |
117 |
| - expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).to be_present |
118 |
| - expect(html.at_css("input[data-follow-up='#both-disability-proof']")).to be_present |
119 |
| - expect(html.to_s).not_to include('data-follow-up="#disability-warning"') |
| 133 | + html = Nokogiri::HTML.parse(response.body) |
| 134 | + expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).not_to be_present |
| 135 | + expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).not_to be_present |
| 136 | + expect(html.at_css("input[data-follow-up='#both-disability-proof']")).not_to be_present |
| 137 | + end |
120 | 138 | end
|
121 | 139 | end
|
122 | 140 |
|
123 | 141 | context "not mfj" do
|
124 | 142 | let(:intake) { create :state_file_md_intake, filing_status: "single" }
|
125 | 143 |
|
126 |
| - it "has primary data followup and warning when primary is not senior" do |
127 |
| - intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
128 |
| - get :edit |
| 144 | + context "with an eligible 1099rs" do |
| 145 | + let!(:state_file1099_r) { create :state_file1099_r, intake: intake } |
| 146 | + it "has primary data followup and warning when primary is not senior" do |
| 147 | + intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
| 148 | + get :edit |
| 149 | + |
| 150 | + html = Nokogiri::HTML.parse(response.body) |
| 151 | + |
| 152 | + expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).to be_present |
| 153 | + expect(html.to_s).to include('data-follow-up="#disability-warning"') |
| 154 | + expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).not_to be_present |
| 155 | + expect(html.at_css("input[data-follow-up='#both-disability-proof']")).not_to be_present |
| 156 | + end |
| 157 | + |
| 158 | + it "does not have primary data followup when primary is senior" do |
| 159 | + intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 66), 1, 1)) |
| 160 | + get :edit |
| 161 | + |
| 162 | + html = Nokogiri::HTML.parse(response.body) |
| 163 | + expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).not_to be_present |
| 164 | + expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).not_to be_present |
| 165 | + expect(html.at_css("input[data-follow-up='#both-disability-proof']")).not_to be_present |
| 166 | + end |
| 167 | + end |
129 | 168 |
|
130 |
| - html = Nokogiri::HTML.parse(response.body) |
| 169 | + context "without an eligible 1099rs" do |
| 170 | + let!(:state_file1099_r) { create :state_file1099_r, intake: intake, taxable_amount: 0} |
131 | 171 |
|
132 |
| - expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).to be_present |
133 |
| - expect(html.to_s).to include('data-follow-up="#disability-warning"') |
134 |
| - expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).not_to be_present |
135 |
| - expect(html.at_css("input[data-follow-up='#both-disability-proof']")).not_to be_present |
136 |
| - end |
| 172 | + it "has no followups and warning when primary is not senior" do |
| 173 | + intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 64), 1, 1)) |
| 174 | + get :edit |
137 | 175 |
|
138 |
| - it "does not have primary data followup when primary is senior" do |
139 |
| - intake.update(primary_birth_date: Date.new((MultiTenantService.statefile.current_tax_year - 66), 1, 1)) |
140 |
| - get :edit |
| 176 | + html = Nokogiri::HTML.parse(response.body) |
141 | 177 |
|
142 |
| - html = Nokogiri::HTML.parse(response.body) |
143 |
| - expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).not_to be_present |
144 |
| - expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).not_to be_present |
145 |
| - expect(html.at_css("input[data-follow-up='#both-disability-proof']")).not_to be_present |
| 178 | + expect(html.at_css("input[data-follow-up='#primary-disability-proof']")).not_to be_present |
| 179 | + expect(html.at_css("input[data-follow-up='#spouse-disability-proof']")).not_to be_present |
| 180 | + expect(html.at_css("input[data-follow-up='#both-disability-proof']")).not_to be_present |
| 181 | + end |
146 | 182 | end
|
147 | 183 | end
|
148 | 184 | end
|
|
0 commit comments