Browse Source

Fix copilot codereview comments

Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
pull/4559/head
maksim.nabokikh 4 weeks ago
parent
commit
b531dc48be
  1. 12
      server/oauth2_test.go

12
server/oauth2_test.go

@ -708,7 +708,7 @@ func TestRedirectedAuthErrHandler(t *testing.T) {
},
{
name: "valid redirect uri with query params",
redirectURI: "https://example.com/callback?existing=param",
redirectURI: "https://example.com/callback?existing=param&another=value",
state: "state456",
errType: errAccessDenied,
description: "User denied access",
@ -779,6 +779,16 @@ func TestRedirectedAuthErrHandler(t *testing.T) {
if tc.description != "" && query.Get("error_description") != tc.description {
t.Errorf("expected error_description %q, got %q", tc.description, query.Get("error_description"))
}
// Verify that existing query parameters are preserved
if tc.name == "valid redirect uri with query params" {
if query.Get("existing") != "param" {
t.Errorf("expected existing parameter 'param', got %q", query.Get("existing"))
}
if query.Get("another") != "value" {
t.Errorf("expected another parameter 'value', got %q", query.Get("another"))
}
}
}
})
}

Loading…
Cancel
Save