mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 03:24:09 +00:00
Providers sharing (#1273)
* third party provider scoping * Simplify logic and allow only admins to mange providers * Broadcast fixes * FIX tests and build * Fixes * Reviews * Scope merchants * DRY fixes
This commit is contained in:
@@ -267,6 +267,8 @@ class AccountTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
test "auto_share_with_family creates shares for all non-owner members" do
|
||||
@family.update!(default_account_sharing: "private")
|
||||
|
||||
account = Account.create_and_sync({
|
||||
family: @family,
|
||||
owner: @admin,
|
||||
|
||||
@@ -536,6 +536,16 @@ class IncomeStatementTest < ActiveSupport::TestCase
|
||||
assert_nil net.net_expense_categories.find { |ct| ct.category.id == @food_category.id }
|
||||
end
|
||||
|
||||
test "empty account_ids returns no results for category stats" do
|
||||
results = IncomeStatement::CategoryStats.new(@family, account_ids: []).call
|
||||
assert_empty results
|
||||
end
|
||||
|
||||
test "empty account_ids returns no results for family stats" do
|
||||
results = IncomeStatement::FamilyStats.new(@family, account_ids: []).call
|
||||
assert_empty results
|
||||
end
|
||||
|
||||
test "returns zero totals when family has only tax-advantaged accounts" do
|
||||
# Create a fresh family with ONLY tax-advantaged accounts
|
||||
family_only_retirement = Family.create!(
|
||||
|
||||
Reference in New Issue
Block a user