Account Issue Model and Resolution Flow + Troubleshooting guides (#1090)

* Rough draft of issue system

* Simplify design

* Remove stale files from merge conflicts

* STI for issues

* Cleanup

* Improve Synth api key flow

* Stub api key for test
This commit is contained in:
Zach Gollwitzer
2024-08-16 12:13:48 -04:00
committed by GitHub
parent c70a08aca2
commit 707c5ca0ca
52 changed files with 507 additions and 211 deletions

View File

@@ -14,14 +14,11 @@ class Account::SyncTest < ActiveSupport::TestCase
Account::Balance::Syncer.expects(:new).with(@account, start_date: nil).returns(@balance_syncer).once
Account::Holding::Syncer.expects(:new).with(@account, start_date: nil).returns(@holding_syncer).once
@account.expects(:resolve_stale_issues).once
@balance_syncer.expects(:run).once
@balance_syncer.expects(:warnings).returns([ "test balance sync warning" ]).once
@holding_syncer.expects(:run).once
@holding_syncer.expects(:warnings).returns([ "test holding sync warning" ]).once
assert_equal "pending", @sync.status
assert_equal [], @sync.warnings
assert_nil @sync.last_ran_at
@sync.run
@@ -29,7 +26,6 @@ class Account::SyncTest < ActiveSupport::TestCase
streams = capture_turbo_stream_broadcasts [ @account.family, :notifications ]
assert_equal "completed", @sync.status
assert_equal [ "test balance sync warning", "test holding sync warning" ], @sync.warnings
assert @sync.last_ran_at
assert_equal "append", streams.first["action"]