From e42df7fbc14d5bf805b4151085772aedc5451fcb Mon Sep 17 00:00:00 2001 From: Savion Lee <9041739+savionlee@users.noreply.github.com> Date: Sat, 7 Feb 2026 07:25:17 -0600 Subject: [PATCH] Copilot assist - correct RateLimitError test failure (#921) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Copilot assist - correct RateLimitError test failure * Rather than hardcoding, in case it's different --------- Co-authored-by: Juan José Mata --- test/jobs/sync_job_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/jobs/sync_job_test.rb b/test/jobs/sync_job_test.rb index a0336ac9d..2b534097b 100644 --- a/test/jobs/sync_job_test.rb +++ b/test/jobs/sync_job_test.rb @@ -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"