Revert "Make bin/rails test pass in Dev Container" to avoid side-effects (#302)

* Revert "Add dummy PLAID_CLIENT_ID and PLAID_SECRET to env (#165)"

This reverts commit 617876f140.

* Make sure Plaid tests pass withtout ENV requirements
This commit is contained in:
Juan José Mata
2025-11-07 19:53:31 +01:00
committed by GitHub
parent ef418c6063
commit e065c98396
2 changed files with 12 additions and 3 deletions

View File

@@ -10,9 +10,7 @@
"containerEnv": {
"GIT_EDITOR": "code --wait",
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}",
"GITHUB_USER": "${localEnv:GITHUB_USER}",
"PLAID_CLIENT_ID": "foo",
"PLAID_SECRET": "bar"
"GITHUB_USER": "${localEnv:GITHUB_USER}"
},
"remoteEnv": {
"PATH": "/workspace/bin:${containerEnv:PATH}"

View File

@@ -5,10 +5,21 @@ class Provider::PlaidTest < ActiveSupport::TestCase
# Do not change, this is whitelisted in the Plaid Dashboard for local dev
@redirect_url = "http://localhost:3000/accounts"
with_env_overrides(
"PLAID_CLIENT_ID" => "foo",
"PLAID_SECRET" => "bar"
) do
Provider::PlaidAdapter.reload_configuration
end
# A specialization of Plaid client with sandbox-only extensions
@plaid = Provider::PlaidSandbox.new
end
teardown do
Provider::PlaidAdapter.reload_configuration
end
test "gets link token" do
VCR.use_cassette("plaid/link_token") do
link_token = @plaid.get_link_token(