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:
soky srm
2026-03-25 17:47:04 +01:00
committed by GitHub
parent 1627cf197b
commit 9410e5b38d
74 changed files with 588 additions and 583 deletions

View File

@@ -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,

View File

@@ -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!(