mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
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
This commit is contained in:
parent
472746df06
commit
69698d0463
6 changed files with 107 additions and 35 deletions
|
@ -1,7 +1,11 @@
|
|||
require "test_helper"
|
||||
|
||||
class AccountTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue