1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 07:39:39 +02:00
Maybe/test/models/family_test.rb
Zach Gollwitzer 9e6e4b1ce6
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
Only run Plaid syncs via webhook after initial sync
2025-05-12 18:55:19 -04:00

25 lines
643 B
Ruby

require "test_helper"
require "csv"
class FamilyTest < ActiveSupport::TestCase
include EntriesTestHelper
include SyncableInterfaceTest
def setup
@family = families(:empty)
@syncable = families(:dylan_family)
end
test "syncs plaid items and manual accounts" do
family_sync = syncs(:family)
manual_accounts_count = @syncable.accounts.manual.count
items_count = @syncable.plaid_items.count
Account.any_instance.expects(:sync_later)
.with(start_date: nil, parent_sync: family_sync)
.times(manual_accounts_count)
@syncable.sync_data(family_sync, start_date: family_sync.start_date)
end
end