From daf6e2b0de704e545b8369a497a27e8b231cd81b Mon Sep 17 00:00:00 2001 From: Shivam Chahar Date: Sun, 7 May 2023 11:12:24 +0530 Subject: [PATCH] Improve AJ queue adapter test case In this test case we only check if the third child's queue adpter is nil or not. We should instead check if the queue adapter is the same as base adapter to ensure that it did not change when we changed qdapters for other jobs. https://github.com/rails/rails/blob/50f0c0f064997186707613889fbccf19416176e2/activejob/test/cases/queue_adapter_test.rb#L44-L52 --- activejob/test/cases/queue_adapter_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activejob/test/cases/queue_adapter_test.rb b/activejob/test/cases/queue_adapter_test.rb index 506a7a429d..ac09cdab73 100644 --- a/activejob/test/cases/queue_adapter_test.rb +++ b/activejob/test/cases/queue_adapter_test.rb @@ -48,7 +48,7 @@ class QueueAdapterTest < ActiveJob::TestCase child_job_three = Class.new(ActiveJob::Base) - assert_not_nil child_job_three.queue_adapter + assert_equal base_queue_adapter, child_job_three.queue_adapter, "child_job_three's queue adapter should remain unchanged" end test "should extract a reasonable name from a class instance" do