Restore two upstream adapter tests the #185 sync dropped

Merged
JA
2mo ago
+59-0

Two upstream tests are missing from test/models/account/provider_import_adapter_test.rb on main:

TestAdded upstream in
preserves existing trade fee when reimport omits it#3507 (5a198fb92)
find_pending_transaction covers every pending-capable provider#3386 (307d1b61d)

Both commits first reached main in #185 (6345863d0). The test file at that merge contains neither test, and #185's description doesn't mention dropping them. The upstream code both tests cover is on main.

This restores both verbatim from upstream main, at the same positions. No application code changes.

Validation

  • provider_import_adapter_test.rb: 61 runs, 0 failures.
  • Each restored test fails when the code it covers is broken:
    • Resetting an omitted fee to 0 fails the first test: expected 4.95, got 0.0.
    • Restricting the pending lookup to simplefin and plaid fails the second: "lunchflow pending transactions must be findable".
  • bin/rubocop on the file: no offenses.

Found while comparing files for #275.