aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/CHANGELOG.md
diff options
context:
space:
mode:
authorEdouard CHIN <edouard.chin@shopify.com>2018-09-26 18:45:52 -0400
committerEdouard CHIN <edouard.chin@shopify.com>2018-09-26 18:45:52 -0400
commit4d75f58991ca6b393ded2398de87fe6a13d4ac72 (patch)
tree02dbe65a785ba2c7a16ce881188525dddb0f298f /activejob/CHANGELOG.md
parent6556898884d636c59baae008e42783b8d3e16440 (diff)
downloadrails-4d75f58991ca6b393ded2398de87fe6a13d4ac72.tar.gz
rails-4d75f58991ca6b393ded2398de87fe6a13d4ac72.tar.bz2
rails-4d75f58991ca6b393ded2398de87fe6a13d4ac72.zip
Add a way to check for subset of arguments when performing jobs:
- When calling `assert_performed_with`/`assert_enqueued_with`, the +args+ needs to match exactly what the job get passed. Some jobs can have lot of arguments, or even a simple hash argument has many key. This is not convenient to test as most tests doesn't need to check if the arguments matches perfectly. This PR make it possible to only check if a subset of arguments were passed to the job.
Diffstat (limited to 'activejob/CHANGELOG.md')
-rw-r--r--activejob/CHANGELOG.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md
index 57a62e963d..af5c197bac 100644
--- a/activejob/CHANGELOG.md
+++ b/activejob/CHANGELOG.md
@@ -1,3 +1,9 @@
+* Allow `assert_enqueued_with`/`assert_performed_with` methods to accept
+ a proc for the `args` argument. This is useful to check if only a subset of arguments
+ matches your expectations.
+
+ *Edouard Chin*
+
* `ActionDispatch::IntegrationTest` includes `ActiveJob::TestHelper` module by default.
*Ricardo Díaz*