Skip to content

Commit

Permalink
Update factories.
Browse files Browse the repository at this point in the history
  • Loading branch information
neb417 committed Nov 5, 2024
1 parent b900635 commit bd1659b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions spec/factories/federal_tax_brackets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
end

trait :with_all_tiers do
after :create do |_record|
create(:federal_tax_bracket, :tier_2)
create(:federal_tax_bracket, :tier_3)
after :create do |record|
create(:federal_tax_bracket, :tier_2, federal_tax_table_type: record.federal_tax_table_type)
create(:federal_tax_bracket, :tier_3, federal_tax_table_type: record.federal_tax_table_type)
end
end
#
Expand Down
3 changes: 2 additions & 1 deletion spec/services/federal_tax_calculator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
RSpec.describe FederalTaxCalculator, type: :service do
subject(:service) do
described_class.call(
income: salary_income.rate
income: salary_income.rate,
federal_tax_table_type_id: tax_brackets.federal_tax_table_type_id
)
end

Expand Down

0 comments on commit bd1659b

Please sign in to comment.