1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix bind_parameter_test regexp

The previous regexp consisted of a single character class pattern.  i.e.
`assert_match` would always pass if the given string contained at least
one of the characters in the regexp.

This commit changes the regexp to check for the intended substring.
This commit is contained in:
Jonathan Hefner 2021-11-30 10:43:36 -06:00
parent 2f53d6c31e
commit fc9f996801

View file

@ -310,7 +310,7 @@ if ActiveRecord::Base.connection.prepared_statements
}.new }.new
logger.sql(event) logger.sql(event)
assert_match %r([[auth_token, [FILTERED]]]), logger.debugs.first assert_match %r/#{Regexp.escape '[["auth_token", "[FILTERED]"]]'}/, logger.debugs.first
end end
end end
end end