(t *testing.T)
| 429 | } |
| 430 | |
| 431 | func 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 | |
| 442 | func TestFindExistingProxyContentFile(t *testing.T) { |
| 443 | t.Helper() |
nothing calls this directly
no test coverage detected