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:
parent
6935ffa3d1
commit
aecb5aafd8
6 changed files with 67 additions and 20 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue