mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Initial pass at Plaid EU (#1555)
* Initial pass at Plaid EU * Add EU support to Plaid Items * Lint * Temp fix for rubocop isseus * Merge cleanup * Pass in region and get tests passing * Use absolute path for translation --------- Signed-off-by: Josh Pigford <josh@joshpigford.com>
This commit is contained in:
@@ -21,6 +21,7 @@ class PlaidItemsControllerTest < ActionDispatch::IntegrationTest
|
||||
post plaid_items_url, params: {
|
||||
plaid_item: {
|
||||
public_token: public_token,
|
||||
region: "us",
|
||||
metadata: { institution: { name: "Plaid Item Name" } }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,7 @@ class PlaidItemTest < ActiveSupport::TestCase
|
||||
|
||||
test "removes plaid item when destroyed" do
|
||||
@plaid_provider = mock
|
||||
|
||||
PlaidItem.stubs(:plaid_provider).returns(@plaid_provider)
|
||||
|
||||
@plaid_item.stubs(:plaid_provider).returns(@plaid_provider)
|
||||
@plaid_provider.expects(:remove_item).with(@plaid_item.access_token).once
|
||||
|
||||
assert_difference "PlaidItem.count", -1 do
|
||||
@@ -21,9 +19,7 @@ class PlaidItemTest < ActiveSupport::TestCase
|
||||
|
||||
test "if plaid item not found, silently continues with deletion" do
|
||||
@plaid_provider = mock
|
||||
|
||||
PlaidItem.stubs(:plaid_provider).returns(@plaid_provider)
|
||||
|
||||
@plaid_item.stubs(:plaid_provider).returns(@plaid_provider)
|
||||
@plaid_provider.expects(:remove_item).with(@plaid_item.access_token).raises(Plaid::ApiError.new("Item not found"))
|
||||
|
||||
assert_difference "PlaidItem.count", -1 do
|
||||
|
||||
Reference in New Issue
Block a user