Skip to content

Commit fc9f996

Browse files
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.
1 parent 2f53d6c commit fc9f996

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/test/cases/bind_parameter_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def debug(str)
310310
}.new
311311

312312
logger.sql(event)
313-
assert_match %r([[auth_token, [FILTERED]]]), logger.debugs.first
313+
assert_match %r/#{Regexp.escape '[["auth_token", "[FILTERED]"]]'}/, logger.debugs.first
314314
end
315315
end
316316
end

0 commit comments

Comments
 (0)