Skip to content

Commit f9457f3

Browse files
Pepanclaude
andcommitted
fix: token validator lambda parameter mismatch in tests
The token_validator lambda in test setup was defined as `-> { true }` (no parameters) but the authentication code calls it with a parameter `token_validator.call(decoded)`. This caused a silent ArgumentError that broke the authentication flow, causing the test to fail. Fixed by changing the lambda to accept the decoded parameter: `-> { true }` → `->(_decoded) { true }` 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d105bab commit f9457f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/rack_transport_patch_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def setup_authentication_callbacks(mock_user, &user_capture)
8484
user_finder: lambda do |decoded|
8585
decoded[:user_id] == 123 ? mock_user : nil
8686
end,
87-
token_validator: -> { true },
87+
token_validator: ->(_decoded) { true },
8888
user_capture: user_capture
8989
}
9090
end

0 commit comments

Comments
 (0)