diff options
author | Sharang Dashputre <sharang.d@gmail.com> | 2018-09-12 10:52:17 +0530 |
---|---|---|
committer | Sharang Dashputre <sharang.d@gmail.com> | 2018-09-21 00:09:40 +0530 |
commit | 14e278f876bb0def5378db78f53024c2a7553fa0 (patch) | |
tree | 75355b024595f58e351415a541a79b52d63e960c /activejob/test/jobs | |
parent | d99d4a58fa5c1344196ab1cb1b162348597f67bf (diff) | |
download | rails-14e278f876bb0def5378db78f53024c2a7553fa0.tar.gz rails-14e278f876bb0def5378db78f53024c2a7553fa0.tar.bz2 rails-14e278f876bb0def5378db78f53024c2a7553fa0.zip |
Make `assert_<enqueued|performed>_with()` compare hashes ignoring order of keys
The test helpers now treat `{ a: 1, b: 2 }` and `{ b: 2, a: 1 }` as equals
Diffstat (limited to 'activejob/test/jobs')
-rw-r--r-- | activejob/test/jobs/multiple_kwargs_job.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activejob/test/jobs/multiple_kwargs_job.rb b/activejob/test/jobs/multiple_kwargs_job.rb new file mode 100644 index 0000000000..b355c4ce1a --- /dev/null +++ b/activejob/test/jobs/multiple_kwargs_job.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +require_relative "../support/job_buffer" + +class MultipleKwargsJob < ActiveJob::Base + def perform(argument1:, argument2:) + JobBuffer.add("Job with argument1: #{argument1}, argument2: #{argument2}") + end +end |