From 33da6503e3716a145bf1784fb1f60eced39b18e9 Mon Sep 17 00:00:00 2001 From: Kharec Date: Sun, 14 Dec 2025 21:06:15 +0100 Subject: [PATCH] test: also test put/delete routes --- internal/server/router_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/server/router_test.go b/internal/server/router_test.go index ff646cc..54cb9c9 100644 --- a/internal/server/router_test.go +++ b/internal/server/router_test.go @@ -158,7 +158,16 @@ func TestProtectedRoutesRequireAuth(t *testing.T) { path string }{ {http.MethodGet, "/api/auth/me"}, + {http.MethodPost, "/api/auth/logout"}, + {http.MethodPost, "/api/auth/revoke"}, + {http.MethodPost, "/api/auth/revoke-all"}, + {http.MethodPut, "/api/auth/email"}, + {http.MethodPut, "/api/auth/username"}, + {http.MethodPut, "/api/auth/password"}, + {http.MethodDelete, "/api/auth/account"}, {http.MethodPost, "/api/posts"}, + {http.MethodPut, "/api/posts/1"}, + {http.MethodDelete, "/api/posts/1"}, {http.MethodPost, "/api/posts/1/vote"}, {http.MethodDelete, "/api/posts/1/vote"}, {http.MethodGet, "/api/posts/1/vote"},