Skip to content

Commit ef5fc1f

Browse files
committed
Fix OAuth redirect URL test
Update the OAuth redirect URL test to exclude fragment Previously, the test included a fragment in the constructed URL. Removing the fragment ensures consistency with the actual URL format used in the application.
1 parent 4f8b28b commit ef5fc1f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

coderd/httpmw/oauth2_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ func TestOAuth2(t *testing.T) {
7777
Host: "some.bad.domain.com",
7878
Path: "/sadf/asdfasdf",
7979
RawQuery: "foo=hello&bar=world",
80-
Fragment: "my_section",
8180
}
82-
expectedValue := uri.Path + "?" + uri.RawQuery + "#" + uri.Fragment
81+
expectedValue := uri.Path + "?" + uri.RawQuery
8382
req := httptest.NewRequest("GET", "/?redirect="+url.QueryEscape(uri.String()), nil)
8483
res := httptest.NewRecorder()
8584
tp := newTestOAuth2Provider(t, oauth2.AccessTypeOffline)

0 commit comments

Comments
 (0)