mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Refactor Plaid transaction type mapping and improve label handling
- Updated `PLAID_TYPE_TO_LABEL` in `TransactionsProcessor` to consolidate labels ("Cancel" and "Cash" now mapped to "Other").
- Adjusted `label_from_plaid_type` to return "Other" as the default fallback.
- Enhanced tests to include additional valid activity labels and ensure label consistency.
- Minor fixes to locale keys for transaction views.
This commit is contained in:
@@ -41,7 +41,13 @@ class TransactionTest < ActiveSupport::TestCase
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Sweep In"
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Sweep Out"
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Dividend"
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Reinvestment"
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Interest"
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Fee"
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Transfer"
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Contribution"
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Withdrawal"
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Exchange"
|
||||
assert_includes Transaction::ACTIVITY_LABELS, "Other"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user