mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 19:44: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:
2
test/fixtures/indexa_capital_items.yml
vendored
2
test/fixtures/indexa_capital_items.yml
vendored
@@ -2,6 +2,7 @@
|
||||
|
||||
configured_with_token:
|
||||
family: dylan_family
|
||||
|
||||
name: "Indexa Capital Connection"
|
||||
api_token: "test_api_token_123"
|
||||
status: good
|
||||
@@ -9,6 +10,7 @@ configured_with_token:
|
||||
|
||||
configured_with_credentials:
|
||||
family: empty
|
||||
|
||||
name: "Indexa Capital Credentials"
|
||||
username: "testuser@example.com"
|
||||
document: "12345678A"
|
||||
|
||||
1
test/fixtures/lunchflow_items.yml
vendored
1
test/fixtures/lunchflow_items.yml
vendored
@@ -1,5 +1,6 @@
|
||||
one:
|
||||
family: dylan_family
|
||||
|
||||
name: "Test Lunchflow Connection"
|
||||
api_key: "test_api_key_123"
|
||||
status: good
|
||||
|
||||
1
test/fixtures/mercury_items.yml
vendored
1
test/fixtures/mercury_items.yml
vendored
@@ -1,5 +1,6 @@
|
||||
one:
|
||||
family: dylan_family
|
||||
|
||||
name: "Test Mercury Connection"
|
||||
token: "test_mercury_token_123"
|
||||
base_url: "https://api-sandbox.mercury.com/api/v1"
|
||||
|
||||
1
test/fixtures/plaid_items.yml
vendored
1
test/fixtures/plaid_items.yml
vendored
@@ -1,5 +1,6 @@
|
||||
one:
|
||||
family: dylan_family
|
||||
|
||||
plaid_id: "item_mock_1"
|
||||
access_token: encrypted_token_1
|
||||
name: "Test Bank"
|
||||
|
||||
2
test/fixtures/snaptrade_items.yml
vendored
2
test/fixtures/snaptrade_items.yml
vendored
@@ -3,6 +3,7 @@
|
||||
|
||||
configured_item:
|
||||
family: dylan_family
|
||||
|
||||
name: "SnapTrade Connection"
|
||||
client_id: "test_client_id"
|
||||
consumer_key: "test_consumer_key"
|
||||
@@ -17,6 +18,7 @@ configured_item:
|
||||
# but before connecting to SnapTrade portal)
|
||||
pending_registration_item:
|
||||
family: empty
|
||||
|
||||
name: "Pending Registration"
|
||||
client_id: "pending_client_id"
|
||||
consumer_key: "pending_consumer_key"
|
||||
|
||||
@@ -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