aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/cases/test_case_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/test/cases/test_case_test.rb')
-rw-r--r--activejob/test/cases/test_case_test.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/activejob/test/cases/test_case_test.rb b/activejob/test/cases/test_case_test.rb
new file mode 100644
index 0000000000..616454a4b6
--- /dev/null
+++ b/activejob/test/cases/test_case_test.rb
@@ -0,0 +1,23 @@
+require 'helper'
+require 'jobs/hello_job'
+require 'jobs/logging_job'
+require 'jobs/nested_job'
+
+class ActiveJobTestCaseTest < ActiveJob::TestCase
+ # this tests that this job class doesn't get its adapter set.
+ # that's the correct behavior since we don't want to break
+ # the `class_attribute` inheritance
+ class TestClassAttributeInheritanceJob < ActiveJob::Base
+ def self.queue_adapter=(*)
+ raise 'Attempting to break `class_attribute` inheritance, bad!'
+ end
+ end
+
+ def test_include_helper
+ assert_includes self.class.ancestors, ActiveJob::TestHelper
+ end
+
+ def test_set_test_adapter
+ assert_kind_of ActiveJob::QueueAdapters::TestAdapter, self.queue_adapter
+ end
+end