Copilot assist - correct RateLimitError test failure (#921)

* Copilot assist - correct RateLimitError  test failure

* Rather than hardcoding, in case it's different

---------

Co-authored-by: Juan José Mata <jjmata@jjmata.com>
This commit is contained in:
Savion Lee
2026-02-07 07:25:17 -06:00
committed by GitHub
parent ecc7c78a92
commit e42df7fbc1

View File

@@ -12,11 +12,11 @@ class SyncJobTest < ActiveJob::TestCase
end
test "configured to retry on TwelveData rate limit error" do
# Verify that SyncJob has a rescue handler for Provider::TwelveData::RateLimitError
# The retry_on declaration adds a rescue_from handler
# Verify that SyncJob has retry_on configured for Provider::TwelveData::RateLimitError
# retry_on adds a rescue handler as [exception_class_name_string, proc]
handler_found = SyncJob.rescue_handlers.any? do |handler|
handler.is_a?(Hash) &&
handler[:exception] == Provider::TwelveData::RateLimitError
handler.is_a?(Array) &&
handler[0] == Provider::TwelveData::RateLimitError.name
end
assert handler_found, "SyncJob should have retry_on configured for Provider::TwelveData::RateLimitError"