More fixture / model test

This commit is contained in:
Andrew Tomaka 2023-11-22 19:17:45 -05:00
parent 2c785a8ee1
commit 7bcb669773
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
3 changed files with 30 additions and 4 deletions

View file

@ -17,3 +17,9 @@ excluded:
included: false
amount: 10_000
member: one
another_included:
description: Salary
included: true
amount: 10_000.00
member: two

View file

@ -2,6 +2,6 @@ require "test_helper"
class IncomeTest < ActiveSupport::TestCase
def test_total
assert_equal 100_000.00, Income.total
assert_equal 110_000.00, Income.total
end
end

View file

@ -1,7 +1,27 @@
require "test_helper"
class MemberTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
def member
members(:one)
end
def test_income
assert_equal 110_000.00, member.income
end
def test_included_income
assert_equal 100_000.00, member.included_income
end
def test_others_included_income
assert_equal 10_000.00, member.others_included_income
end
def test_burden_percent
assert_equal 0.91, member.burden_percent
end
def test_burden_amount
assert_equal 627.90, member.burden_amount
end
end