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: railtie to use correct load hook #1438

Merged
merged 2 commits into from
Jan 24, 2024
Merged

fix: railtie to use correct load hook #1438

merged 2 commits into from
Jan 24, 2024

Conversation

bf4
Copy link
Collaborator

@bf4 bf4 commented Jan 24, 2024

I was getting a FrozenError in my app testing v0-11-dev
and noticed that the problem was in the JR initializer call
to ActionDispatch::IntegrationTest

per

Load hooks is the recommended way to add this behavior.

All Submissions:

  • I've checked to ensure there aren't other open Pull Requests for the same update/change.
  • I've submitted a ticket for my issue if one did not already exist.
  • My submission passes all tests. (Please run the full test suite locally to cut down on noise from travis failures.)
  • I've used Github auto-closing keywords in the commit message or the description.
  • I've added/updated tests for this change.

New Feature Submissions:

  • I've submitted an issue that describes this feature, and received the go ahead from the maintainers.
  • My submission includes new tests.
  • My submission maintains compliance with JSON:API.

Bug fixes and Changes to Core Features:

  • I've included an explanation of what the changes do and why I'd like you to include them.
  • I've provided test(s) that fails without the change.

Test Plan:

Reviewer Checklist:

  • Maintains compliance with JSON:API
  • Adequate test coverage exists to prevent regressions

@bf4 bf4 merged commit e4c9707 into v0-11-dev Jan 24, 2024
39 checks passed
@bf4 bf4 deleted the v0-11-dev-fixups branch January 24, 2024 18:16
initializer "jsonapi_resources.testing", after: :initialize do
next unless Rails.env.test?
# https://guides.rubyonrails.org/v6.0/engines.html#available-hooks
ActiveSupport.on_load(:action_dispatch_integration_test) do
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lgebhardt this should have used this load hook

lgebhardt pushed a commit that referenced this pull request Apr 18, 2024
* chore: fix file typo

* fix: railtie to use correct load hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant