1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-04 21:15:19 +02:00

Pass transactions cursor when fetching plaid transactions

This commit is contained in:
Zach Gollwitzer 2025-05-24 17:41:14 -04:00
parent 6935ffa3d1
commit aecb5aafd8
6 changed files with 67 additions and 20 deletions

View file

@ -33,14 +33,17 @@ class PlaidItem::ImporterTest < ActiveSupport::TestCase
PlaidItem::AccountsSnapshot.any_instance.expects(:accounts).returns([
OpenStruct.new(
account_id: "acc_1",
type: "depository"
type: "depository",
)
]).at_least_once
PlaidItem::AccountsSnapshot.any_instance.expects(:transactions_cursor).returns("test_cursor_1")
PlaidItem::AccountsSnapshot.any_instance.expects(:get_account_data).with("acc_1").once
PlaidAccount::Importer.any_instance.expects(:import).once
@plaid_item.expects(:update!).with(next_cursor: "test_cursor_1")
@plaid_item.expects(:upsert_plaid_snapshot!).with(item_data)
@plaid_item.expects(:upsert_plaid_institution_snapshot!).with(institution_data)