aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/cases
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/test/cases')
-rw-r--r--activejob/test/cases/queue_naming_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/activejob/test/cases/queue_naming_test.rb b/activejob/test/cases/queue_naming_test.rb
index 426af608f0..fdfd1afceb 100644
--- a/activejob/test/cases/queue_naming_test.rb
+++ b/activejob/test/cases/queue_naming_test.rb
@@ -20,4 +20,19 @@ class QueueNamingTest < ActiveSupport::TestCase
HelloJob.queue_name = LoggingJob.queue_name = ActiveJob::Base.default_queue_name
end
end
+
+ test 'should prefix the queue name' do
+ begin
+ original_queue_name_prefix = ActiveJob::Base.queue_name_prefix
+ original_queue_name = HelloJob.queue_name
+
+ ActiveJob::Base.queue_name_prefix = 'aj'
+ HelloJob.queue_as :low
+ assert_equal 'aj_low', HelloJob.queue_name
+ ensure
+ ActiveJob::Base.queue_name_prefix = original_queue_name_prefix
+ HelloJob.queue_name = original_queue_name
+ end
+ end
+
end