1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-21 22:29:38 +02:00
Maybe/test/models/account_test.rb
Lee McAlilly 69698d0463
Add initial model tests with starter fixtures for User, Family, and Account (#281)
* Add initial user fixture

* Add initial tests for  the User model

* Add initial tests for Family and a valid Account

* Pass rubocop
2024-02-03 13:07:23 -06:00

11 lines
399 B
Ruby

require "test_helper"
class AccountTest < ActiveSupport::TestCase
test "new account should be valid" do
depository = Account::Depository.create!
account = Account.create!(family: families(:dylan_family), name: "Explicit Checking", balance: 1200, accountable: depository)
assert account.valid?
assert_not_nil account.accountable_id
assert_not_nil account.accountable
end
end