aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/cases
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-06-29 19:35:47 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-06-29 19:46:55 +0300
commit58271f63144b74f192d0b37a1f7b3a469307974b (patch)
tree78a39ea2da3bd235bcee480d048c3fb914acd162 /activejob/test/cases
parenta9692941600c34afbc8d60d15cb5f179d30f67e5 (diff)
downloadrails-58271f63144b74f192d0b37a1f7b3a469307974b.tar.gz
rails-58271f63144b74f192d0b37a1f7b3a469307974b.tar.bz2
rails-58271f63144b74f192d0b37a1f7b3a469307974b.zip
Clarify activejob/lib/active_job/test_helper.rb
Rename `in_block_job` to `enqueued_job` since this variable can refer not only to jobs that were created in the block. See #33258. Return back accidentally removed test to activejob/test/cases/test_helper_test.rb See #33258. Fix name of tests.
Diffstat (limited to 'activejob/test/cases')
-rw-r--r--activejob/test/cases/test_helper_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/activejob/test/cases/test_helper_test.rb b/activejob/test/cases/test_helper_test.rb
index 3fcac61bed..76d12bee82 100644
--- a/activejob/test/cases/test_helper_test.rb
+++ b/activejob/test/cases/test_helper_test.rb
@@ -471,6 +471,12 @@ class EnqueuedJobsTest < ActiveJob::TestCase
end
end
+ def test_assert_enqueued_with_with_at_option
+ assert_enqueued_with(job: HelloJob, at: Date.tomorrow.noon) do
+ HelloJob.set(wait_until: Date.tomorrow.noon).perform_later
+ end
+ end
+
def test_assert_enqueued_with_with_no_block_with_at_option
HelloJob.set(wait_until: Date.tomorrow.noon).perform_later
assert_enqueued_with(job: HelloJob, at: Date.tomorrow.noon)
@@ -501,7 +507,7 @@ class EnqueuedJobsTest < ActiveJob::TestCase
assert_equal "No enqueued job found with {:job=>HelloJob, :args=>[#{wilma.inspect}]}", error.message
end
- def test_assert_enqueued_with_with_failure_with_no_block_with_global_id_args
+ def test_assert_enqueued_with_failure_with_no_block_with_global_id_args
ricardo = Person.new(9)
wilma = Person.new(11)
error = assert_raise ActiveSupport::TestCase::Assertion do
@@ -512,7 +518,7 @@ class EnqueuedJobsTest < ActiveJob::TestCase
assert_equal "No enqueued job found with {:job=>HelloJob, :args=>[#{wilma.inspect}]}", error.message
end
- def test_assert_enqueued_job_does_not_change_jobs_count
+ def test_assert_enqueued_with_does_not_change_jobs_count
HelloJob.perform_later
assert_enqueued_with(job: HelloJob) do
HelloJob.perform_later