New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to check for subset of arguments when performing jobs: #33995

Merged
merged 1 commit into from Sep 27, 2018

Conversation

Projects
None yet
5 participants
@Edouard-chin
Contributor

Edouard-chin commented Sep 26, 2018

  • 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.

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.
@rails-bot

This comment has been minimized.

Show comment
Hide comment
@rails-bot

rails-bot Sep 26, 2018

r? @kaspth

(@rails-bot has picked a reviewer for you, use r? to override)

rails-bot commented Sep 26, 2018

r? @kaspth

(@rails-bot has picked a reviewer for you, use r? to override)

@gmcgibbon gmcgibbon added the activejob label Sep 27, 2018

@rafaelfranca rafaelfranca merged commit dc47bb5 into rails:master Sep 27, 2018

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Edouard-chin Edouard-chin deleted the Edouard-chin:ec-active-job-subset-arg branch Sep 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment