aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorGannon McGibbon <gannon.mcgibbon@gmail.com>2019-04-20 12:36:58 +0900
committerGitHub <noreply@github.com>2019-04-20 12:36:58 +0900
commit9057e64151428143cf182b115829d3cd6a0e94ff (patch)
treef7957322fe25074ea5bfc90b5bf1af2ce873bb8e /activejob
parent21747560be42d68200060a1d90419717e0ca339e (diff)
parent39b6840f3c8ea026dae7c4f6c156afabedcefd00 (diff)
downloadrails-9057e64151428143cf182b115829d3cd6a0e94ff.tar.gz
rails-9057e64151428143cf182b115829d3cd6a0e94ff.tar.bz2
rails-9057e64151428143cf182b115829d3cd6a0e94ff.zip
Merge pull request #35738 from gmcgibbon/aj_assert_drop_usec_docs
ActiveJob time argument assertion documentation
Diffstat (limited to 'activejob')
-rw-r--r--activejob/test/cases/test_helper_test.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/activejob/test/cases/test_helper_test.rb b/activejob/test/cases/test_helper_test.rb
index d6607cb6b6..32471cfacc 100644
--- a/activejob/test/cases/test_helper_test.rb
+++ b/activejob/test/cases/test_helper_test.rb
@@ -1710,28 +1710,28 @@ class PerformedJobsTest < ActiveJob::TestCase
def test_assert_performed_with_time
now = Time.now
- args = [{ argument1: { now: now } }]
+ args = [{ argument1: { now: now }, argument2: now }]
- assert_enqueued_with(job: MultipleKwargsJob, args: args) do
- MultipleKwargsJob.perform_later(argument1: { now: now })
+ assert_performed_with(job: MultipleKwargsJob, args: args) do
+ MultipleKwargsJob.perform_later(argument1: { now: now }, argument2: now)
end
end
def test_assert_performed_with_date_time
now = DateTime.now
- args = [{ argument1: { now: now } }]
+ args = [{ argument1: { now: now }, argument2: now }]
- assert_enqueued_with(job: MultipleKwargsJob, args: args) do
- MultipleKwargsJob.perform_later(argument1: { now: now })
+ assert_performed_with(job: MultipleKwargsJob, args: args) do
+ MultipleKwargsJob.perform_later(argument1: { now: now }, argument2: now)
end
end
def test_assert_performed_with_time_with_zone
now = Time.now.in_time_zone("Tokyo")
- args = [{ argument1: { now: now } }]
+ args = [{ argument1: { now: now }, argument2: now }]
- assert_enqueued_with(job: MultipleKwargsJob, args: args) do
- MultipleKwargsJob.perform_later(argument1: { now: now })
+ assert_performed_with(job: MultipleKwargsJob, args: args) do
+ MultipleKwargsJob.perform_later(argument1: { now: now }, argument2: now)
end
end