Skip to content

Ensure unspecified params are nil, not an empty string#35

Closed
mistydemeo wants to merge 1 commit intomasterfrom
ensure_unspecified_params_are_nil
Closed

Ensure unspecified params are nil, not an empty string#35
mistydemeo wants to merge 1 commit intomasterfrom
ensure_unspecified_params_are_nil

Conversation

@mistydemeo
Copy link
Contributor

This fixes a regression we noticed in Rails 5. Unspecified matched regex values were being returned as empty strings, not nil; this broke chatops-controller apps which did truthiness and nil checks against their parameters. I tested this new test against both Rails 4 and 5; should be compatible with both.

@mistydemeo mistydemeo force-pushed the ensure_unspecified_params_are_nil branch from ff224d5 to 118e7f0 Compare January 30, 2018 19:14
Copy link

@mattr- mattr- left a comment

Choose a reason for hiding this comment

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

:shipit:

@mistydemeo
Copy link
Contributor Author

Based on the discussion in rails/rails#31845, it appears that this is a newly-introduced issue in Rails's controller testing. It's being fixed upstream, so I'm going to close this with the understanding that chatops-controller based tests will act unexpectedly in current versions of Rails 5.x.

@mistydemeo mistydemeo closed this Jan 31, 2018
@mistydemeo mistydemeo deleted the ensure_unspecified_params_are_nil branch January 31, 2018 23:13
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.

2 participants