MCPcopy Index your code
hub / github.com/imroc/req / TestSetOutputDirectory

Function TestSetOutputDirectory

client_test.go:489–499  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

487}
488
489func TestSetOutputDirectory(t *testing.T) {
490 outFile := "test_output_dir"
491 resp, err := tc().
492 SetOutputDirectory(testDataPath).
493 R().SetOutputFile(outFile).
494 Get("/")
495 assertSuccess(t, resp, err)
496 content := string(getTestFileContent(t, outFile))
497 os.Remove(tests.GetTestFilePath(outFile))
498 tests.AssertEqual(t, "TestGet: text response", content)
499}
500
501func TestSetBaseURL(t *testing.T) {
502 baseURL := "http://dummy-req.local/test"

Callers

nothing calls this directly

Calls 9

GetTestFilePathFunction · 0.92
AssertEqualFunction · 0.92
tcFunction · 0.85
assertSuccessFunction · 0.85
getTestFileContentFunction · 0.85
RMethod · 0.80
SetOutputDirectoryMethod · 0.80
GetMethod · 0.45
SetOutputFileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…