Skip to content

Commit 75f477e

Browse files
committed
add an extra test around the case of the bearing token header (insensitive case)
1 parent a20d6a8 commit 75f477e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/lib/redacting_logger_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@
165165
case: "redacts authorization bearer token",
166166
message: '-H "Authorization: Bearer ab123456789a1abcd1~_.-+456ABCDE=" -H "Content-Type: application/json"',
167167
expected_message: '-H "[REDACTED]" -H "Content-Type: application/json"'
168+
},
169+
{
170+
case: "redacts authorization bearer token with case insensitivity",
171+
message: '-H "authorizAtion: beaRer ab123456789a1abcd1~_.-+456ABCDE=" -H "Content-Type: application/json"',
172+
expected_message: '-H "[REDACTED]" -H "Content-Type: application/json"'
168173
}
169174
].each do |test|
170175
it "redacts #{test[:case]}" do

0 commit comments

Comments
 (0)