From acd3ef5bcf48d53c104e55f5241f012bf0929bdc Mon Sep 17 00:00:00 2001 From: Boris Terzic Date: Wed, 18 Dec 2024 07:39:45 +0100 Subject: [PATCH] docs: comments for server test --- internal/server/server_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/server/server_test.go b/internal/server/server_test.go index 8279aea..32b052e 100644 --- a/internal/server/server_test.go +++ b/internal/server/server_test.go @@ -281,6 +281,8 @@ func createTestUser(t *testing.T, controller server.Controller) { // construct a test HTTP client with cookie support so we can transport the CSRF token // and suppressed redirects so we can assert against the location header +// createTestHttpClient returns an HTTP client with cookie support and disabled redirects. +// This is useful for testing scenarios where you need to assert against the location header. func createTestHttpClient() *http.Client { jar, _ := cookiejar.New(nil) return &http.Client{