blob: 4ae2add3a848b45aa76bfd6662f8677d1410cfa8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# frozen_string_literal: true
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, queue_adapter
end
end
|