mirror of
https://github.com/we-promise/sure.git
synced 2026-05-12 23:25:00 +00:00
* Complete Sophtron account mapping * Clarify Sophtron login challenge flow * Add Sophtron connection UI timeout * Treat Sophtron timeout jobs as failed * Reset failed Sophtron connection state * Handle stale Sophtron connection jobs * Advance Sophtron polling timeout * Shorten Sophtron connection timeout * Fix Sophtron modal polling updates * Stabilize Sophtron MFA polling * Give Sophtron OTP challenges more time * Clarify Sophtron institution login failures * Extend Sophtron polling during login progress * Probe Sophtron accounts after completed MFA step * Align Sophtron dialogs with design system * Start Sophtron initial load after linking accounts * Fix Sophtron initial transaction load * Fail Sophtron sync without institution connection * Fix tests * Wrap Sophtron account linking in transaction * Wrap Sophtron provider responses * Fix Sophtron MFA security tests * Guard Sophtron MFA challenge arrays * Respect Sophtron initial load window * Use unique Sophtron MFA answer field ids * Address Sophtron review follow-ups * Fix Sophtron transaction sync refresh * Avoid blocking Sophtron refresh polling * Move Sophtron account helpers to model * Keep Sophtron grouping provider-level * Start new Sophtron institution links * Isolate Sophtron institution connections --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
25 lines
801 B
Ruby
25 lines
801 B
Ruby
require "test_helper"
|
|
|
|
class SophtronAccountTest < ActiveSupport::TestCase
|
|
test "upsert_sophtron_snapshot stores owning item institution metadata fallback" do
|
|
item = families(:dylan_family).sophtron_items.create!(
|
|
name: "Sophtron Connection",
|
|
user_id: "developer-user",
|
|
access_key: Base64.strict_encode64("secret-key"),
|
|
institution_name: "Apple / Goldman Sachs",
|
|
user_institution_id: "ui-apple"
|
|
)
|
|
|
|
account = item.sophtron_accounts.build
|
|
account.upsert_sophtron_snapshot!(
|
|
account_id: "card-1",
|
|
account_name: "Juan",
|
|
currency: "USD",
|
|
balance: "1947.18"
|
|
)
|
|
|
|
assert_equal "Apple / Goldman Sachs", account.institution_metadata["name"]
|
|
assert_equal "ui-apple", account.institution_metadata["user_institution_id"]
|
|
end
|
|
end
|