MCPcopy
hub / github.com/autobrr/qui / TestParseProxyMediaInfoContentPath_Form

Function TestParseProxyMediaInfoContentPath_Form

internal/proxy/handler_test.go:431–440  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

429}
430
431func TestParseProxyMediaInfoContentPath_Form(t *testing.T) {
432 t.Helper()
433
434 req := httptest.NewRequest(http.MethodPost, "/proxy/test/api/v2/torrents/mediainfo", strings.NewReader("content_path=folder%2Ffile.mkv"))
435 req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
436
437 contentPath, err := parseProxyMediaInfoContentPath(req)
438 require.NoError(t, err)
439 require.Equal(t, filepath.FromSlash("folder/file.mkv"), contentPath)
440}
441
442func TestFindExistingProxyContentFile(t *testing.T) {
443 t.Helper()

Callers

nothing calls this directly

Calls 2

SetMethod · 0.45

Tested by

no test coverage detected