Code refactoring for #1939

This commit is contained in:
Alex X
2025-11-16 19:01:06 +03:00
parent e2b63a4f6c
commit 0bae158e41
4 changed files with 10 additions and 47 deletions
-14
View File
@@ -35,20 +35,6 @@ func TestApiSchemes(t *testing.T) {
require.Contains(t, schemes, "rtmp")
require.Contains(t, schemes, "http")
})
t.Run("non-GET requests return method not allowed", func(t *testing.T) {
methods := []string{"POST", "PUT", "DELETE", "PATCH"}
for _, method := range methods {
t.Run(method, func(t *testing.T) {
req := httptest.NewRequest(method, "/api/schemes", nil)
w := httptest.NewRecorder()
apiSchemes(w, req)
require.Equal(t, http.StatusMethodNotAllowed, w.Code)
})
}
})
}
func TestApiSchemesNoDuplicates(t *testing.T) {