diff options
Diffstat (limited to 'activejob/test')
-rw-r--r-- | activejob/test/cases/test_helper_test.rb | 7 | ||||
-rw-r--r-- | activejob/test/jobs/application_job.rb | 4 | ||||
-rw-r--r-- | activejob/test/jobs/inherited_job.rb | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/activejob/test/cases/test_helper_test.rb b/activejob/test/cases/test_helper_test.rb index 2398402d5d..253c557cc5 100644 --- a/activejob/test/cases/test_helper_test.rb +++ b/activejob/test/cases/test_helper_test.rb @@ -5,6 +5,7 @@ require "jobs/hello_job" require "jobs/logging_job" require "jobs/nested_job" require "jobs/rescue_job" +require "jobs/inherited_job" require "models/person" class EnqueuedJobsTest < ActiveJob::TestCase @@ -521,3 +522,9 @@ class OverrideQueueAdapterTest < ActiveJob::TestCase assert_instance_of CustomQueueAdapter, HelloJob.queue_adapter end end + +class InheritedJobTest < ActiveJob::TestCase + def test_queue_adapter_is_test_adapter + assert_instance_of ActiveJob::QueueAdapters::TestAdapter, InheritedJob.queue_adapter + end +end diff --git a/activejob/test/jobs/application_job.rb b/activejob/test/jobs/application_job.rb new file mode 100644 index 0000000000..4a78b890ec --- /dev/null +++ b/activejob/test/jobs/application_job.rb @@ -0,0 +1,4 @@ +require_relative "../support/job_buffer" + +class ApplicationJob < ActiveJob::Base +end diff --git a/activejob/test/jobs/inherited_job.rb b/activejob/test/jobs/inherited_job.rb new file mode 100644 index 0000000000..60fca66f88 --- /dev/null +++ b/activejob/test/jobs/inherited_job.rb @@ -0,0 +1,5 @@ +require_relative "application_job" + +class InheritedJob < ApplicationJob + self.queue_adapter = :inline +end |