1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-22 22:59:39 +02:00
Maybe/test/models/family_test.rb

29 lines
679 B
Ruby
Raw Normal View History

2024-02-02 09:05:04 -06:00
require "test_helper"
class FamilyTest < ActiveSupport::TestCase
def setup
@dylan_family = families(:dylan_family)
end
test "should have many users" do
assert @dylan_family.users.size > 0
assert @dylan_family.users.include?(users(:family_admin))
end
test "should have many accounts" do
assert @dylan_family.accounts.size > 0
end
test "should destroy dependent users" do
assert_difference("User.count", -@dylan_family.users.count) do
@dylan_family.destroy
end
end
test "should destroy dependent accounts" do
assert_difference("Account.count", -@dylan_family.accounts.count) do
@dylan_family.destroy
end
end
2024-02-02 09:05:04 -06:00
end