Add some model tests #9
2 changed files with 7 additions and 9 deletions
8
test/fixtures/credit_card_bills.yml
vendored
8
test/fixtures/credit_card_bills.yml
vendored
|
@ -1,9 +1,5 @@
|
||||||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||||
|
|
||||||
one:
|
one:
|
||||||
description: MyString
|
description: Credit Card Bill One
|
||||||
amount: 9.99
|
amount: 1_000.00
|
||||||
|
|
||||||
two:
|
|
||||||
description: MyString
|
|
||||||
amount: 9.99
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
require "test_helper"
|
require "test_helper"
|
||||||
|
|
||||||
class CreditCardBillTest < ActiveSupport::TestCase
|
class CreditCardBillTest < ActiveSupport::TestCase
|
||||||
# test "the truth" do
|
def test_unpaid
|
||||||
# assert true
|
credit_card_bill = credit_card_bills(:one)
|
||||||
# end
|
|
||||||
|
assert_equal 870.00, credit_card_bill.unpaid
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue