Skip to content
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

Fix incorrect arguments for Active Job test job [internal] #48623

Merged
merged 1 commit into from Jul 3, 2023

Conversation

ghiculescu
Copy link
Member

This is an internal fix, not user facing. I noticed it while working on #48585.

Currently the LoggingJob does not accept more than one argument. But there's a few tests that call it with multiple arguments and assert that it is queued correctly. Those tests pass because the job is not performed, but if the job was performed, they'd fail.

This PR just fixes LoggingJob to accept a splat of arguments, and adds a test to ensure that it works correctly.

This is an internal fix, not user facing.

Currently the `LoggingJob` does not accept more than one argument. But there's [a few tests](https://github.com/rails/rails/blob/f46d3452ae30c46d3e213c687decbbca0cee9119/activejob/test/cases/test_helper_test.rb#L518-L537) that call it with multiple arguments and assert that it is queued correctly. Those tests pass because the job is not performed, but if the job was performed, they'd fail.

This PR just fixes `LoggingJob` to accept a splat of arguments, and adds a test to ensure that it works correctly.
@rails-bot rails-bot bot added the activejob label Jul 2, 2023
@ghiculescu ghiculescu changed the title Fix incorrect arguments for Active Job test job Fix incorrect arguments for Active Job test job [internal] Jul 2, 2023
@ghiculescu ghiculescu added the ready PRs ready to merge label Jul 2, 2023
@yahonda yahonda merged commit 83904c4 into rails:main Jul 3, 2023
9 checks passed
@ghiculescu ghiculescu deleted the logging-job-args branch July 3, 2023 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activejob ready PRs ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants