From b2d255cc0dd54bd418cb09081c46951b8079c22c Mon Sep 17 00:00:00 2001 From: Kharec Date: Thu, 13 Nov 2025 08:16:06 +0100 Subject: [PATCH] refactor: use assertCookie and createUserWithCleanup helpers --- .../page_handler_forms_integration_test.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/internal/integration/page_handler_forms_integration_test.go b/internal/integration/page_handler_forms_integration_test.go index cee0851..f18387b 100644 --- a/internal/integration/page_handler_forms_integration_test.go +++ b/internal/integration/page_handler_forms_integration_test.go @@ -185,17 +185,7 @@ func TestIntegration_PageHandlerFormWorkflows(t *testing.T) { freshCtx.Router.ServeHTTP(rec, req) assertStatus(t, rec, http.StatusSeeOther) - cookies := rec.Result().Cookies() - authCookieSet := false - for _, cookie := range cookies { - if cookie.Name == "auth_token" && cookie.Value != "" { - authCookieSet = true - break - } - } - if !authCookieSet { - t.Error("Expected auth cookie to be set on login") - } + assertCookie(t, rec, "auth_token", "") }) t.Run("Email_Confirmation_Page_Handler", func(t *testing.T) {