mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-04 21:15:19 +02:00
parent
4bf72506d5
commit
53f4b32c33
19 changed files with 91 additions and 86 deletions
|
@ -4,13 +4,12 @@ require "ostruct"
|
|||
class PlaidItemsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in @user = users(:family_admin)
|
||||
|
||||
@plaid_provider = mock
|
||||
|
||||
PlaidItem.stubs(:plaid_provider).returns(@plaid_provider)
|
||||
end
|
||||
|
||||
test "create" do
|
||||
@plaid_provider = mock
|
||||
PlaidItem.expects(:plaid_provider_for_region).with("us").returns(@plaid_provider)
|
||||
|
||||
public_token = "public-sandbox-1234"
|
||||
|
||||
@plaid_provider.expects(:exchange_public_token).with(public_token).returns(
|
||||
|
|
|
@ -4,9 +4,7 @@ module AccountableResourceInterfaceTest
|
|||
extend ActiveSupport::Testing::Declarative
|
||||
|
||||
test "shows new form" do
|
||||
Plaid::PlaidApi.any_instance.stubs(:link_token_create).returns(
|
||||
Plaid::LinkTokenCreateResponse.new(link_token: "test-link-token")
|
||||
)
|
||||
Family.any_instance.stubs(:get_link_token).returns("test-link-token")
|
||||
|
||||
get new_polymorphic_url(@account.accountable)
|
||||
assert_response :success
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue