mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 11:34:13 +00:00
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:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user