mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
Lunchflow settings family (#363)
* Move provider config to family * remove global settings * Remove turbo auto submit * Fix flash location * Fix mssing syncer for lunchflow * Update schema.rb * FIX tests and encryption config * FIX make rabbit happy * FIX run migration in SQL * FIX turbo frame modal * Branding fixes * FIX rabbit * OCD with product names * More OCD * No other console.log|warn in codebase --------- Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -87,15 +87,13 @@ class Settings::ProvidersControllerTest < ActionDispatch::IntegrationTest
|
||||
Setting["plaid_secret"] = nil
|
||||
Setting["plaid_eu_client_id"] = nil
|
||||
Setting["plaid_eu_secret"] = nil
|
||||
Setting["simplefin_setup_token"] = nil
|
||||
|
||||
patch settings_providers_url, params: {
|
||||
setting: {
|
||||
plaid_client_id: "plaid_client",
|
||||
plaid_secret: "plaid_secret",
|
||||
plaid_eu_client_id: "plaid_eu_client",
|
||||
plaid_eu_secret: "plaid_eu_secret",
|
||||
simplefin_setup_token: "simplefin_token"
|
||||
plaid_eu_secret: "plaid_eu_secret"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +104,6 @@ class Settings::ProvidersControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_equal "plaid_secret", Setting["plaid_secret"]
|
||||
assert_equal "plaid_eu_client", Setting["plaid_eu_client_id"]
|
||||
assert_equal "plaid_eu_secret", Setting["plaid_eu_secret"]
|
||||
assert_equal "simplefin_token", Setting["simplefin_setup_token"]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -202,10 +199,10 @@ class Settings::ProvidersControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_equal "client_id_1", Setting["plaid_client_id"]
|
||||
assert_equal "secret_1", Setting["plaid_secret"]
|
||||
|
||||
# Simulate second request updating simplefin fields
|
||||
# Simulate second request updating different plaid fields
|
||||
patch settings_providers_url, params: {
|
||||
setting: {
|
||||
simplefin_setup_token: "token_1"
|
||||
plaid_environment: "production"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +210,7 @@ class Settings::ProvidersControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_equal "existing_value", Setting["existing_field"]
|
||||
assert_equal "client_id_1", Setting["plaid_client_id"]
|
||||
assert_equal "secret_1", Setting["plaid_secret"]
|
||||
assert_equal "token_1", Setting["simplefin_setup_token"]
|
||||
assert_equal "production", Setting["plaid_environment"]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -252,14 +249,14 @@ class Settings::ProvidersControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
test "reloads configuration for multiple providers when updated" do
|
||||
with_self_hosting do
|
||||
# Both providers should have their configuration reloaded
|
||||
# Both Plaid providers (US and EU) should have their configuration reloaded
|
||||
Provider::PlaidAdapter.expects(:reload_configuration).once
|
||||
Provider::SimplefinAdapter.expects(:reload_configuration).once
|
||||
Provider::PlaidEuAdapter.expects(:reload_configuration).once
|
||||
|
||||
patch settings_providers_url, params: {
|
||||
setting: {
|
||||
plaid_client_id: "plaid_client",
|
||||
simplefin_setup_token: "simplefin_token"
|
||||
plaid_eu_client_id: "plaid_eu_client"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user