-
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
Add in lines 15 and 16 to MD Form 502 #4980
base: main
Are you sure you want to change the base?
Changes from 3 commits
0fb9706
75c31c4
e368373
b9ac5f2
159016b
e2c5fee
0938257
4ebf345
62220b8
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 |
---|---|---|
|
@@ -818,18 +818,42 @@ | |
end | ||
end | ||
|
||
describe "#calculate_line_15" do | ||
before do | ||
allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:calculate_line_9).and_return 2 | ||
allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:calculate_line_10a).and_return 4 | ||
allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:calculate_line_11).and_return 6 | ||
allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:calculate_line_13).and_return 8 | ||
end | ||
it "sums lines 8 - 14" do | ||
instance.calculate | ||
expect(instance.lines[:MD502_LINE_15].value).to eq 20 | ||
end | ||
end | ||
|
||
describe "#calculate_line_16" do | ||
before do | ||
allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:calculate_line_7).and_return 150 | ||
allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:calculate_line_15).and_return 50 | ||
end | ||
it "subtracts line 15 from line 7" do | ||
instance.calculate | ||
expect(instance.lines[:MD502_LINE_16].value).to eq 100 | ||
end | ||
end | ||
|
||
describe "#calculate_line_17" do | ||
context "when method is standard" do | ||
[ | ||
[["single", "married_filing_separately", "dependent"], [ | ||
[12_000, 1_800], | ||
[17_999, 17_999 * 0.15], | ||
[18_000, 2_700], | ||
[18_001, 2_700], | ||
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. changed the tests to expose the above mentioned bug. |
||
]], | ||
[["married_filing_jointly", "head_of_household", "qualifying_widow"], [ | ||
[24_333, 3_650], | ||
[36_332, 36_332 * 0.15], | ||
[36_333, 5_450], | ||
[36_334, 5_450], | ||
]] | ||
].each do |filing_statuses, agis_to_deductions| | ||
filing_statuses.each do |filing_status| | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -411,7 +411,6 @@ | |
end | ||
|
||
it 'outputs the total state and local tax withheld' do | ||
puts pdf_fields | ||
expect(pdf_fields["Text Box 68"]).to eq "500" | ||
end | ||
end | ||
|
@@ -440,5 +439,21 @@ | |
expect(pdf_fields["Enter 13"].to_i).to eq 0 | ||
end | ||
end | ||
|
||
describe "Line 15" do | ||
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. minor thing but there's a section above |
||
let(:total_subtractions) { 100 } | ||
it "outputs the total subtractions" do | ||
allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:calculate_line_15).and_return total_subtractions | ||
expect(pdf_fields["Enter 15"].to_i).to eq total_subtractions | ||
end | ||
end | ||
|
||
describe "Line 16" do | ||
let(:state_adjusted_gross_income) { 150 } | ||
it "outputs the total subtractions" do | ||
allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:calculate_line_16).and_return state_adjusted_gross_income | ||
expect(pdf_fields["Enter 16"].to_i).to eq state_adjusted_gross_income | ||
end | ||
end | ||
end | ||
end |
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.
@jenny-heath helped sort out there was a bug here where its supposed to be "$18,000 or over" and so the band is changed in this line. Here is the original ticket for reference.