MCPcopy
hub / github.com/larksuite/cli / TestSaveResponse_RejectsAbsolutePath

Function TestSaveResponse_RejectsAbsolutePath

internal/client/response_test.go:496–502  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

494}
495
496func TestSaveResponse_RejectsAbsolutePath(t *testing.T) {
497 resp := newApiResp([]byte("data"), map[string]string{"Content-Type": "application/octet-stream"})
498 _, err := SaveResponse(&localfileio.LocalFileIO{}, resp, "/tmp/evil.txt")
499 if err == nil {
500 t.Fatal("expected error for absolute path")
501 }
502}
503
504func TestSaveResponse_MetadataContainsAbsolutePath(t *testing.T) {
505 dir := t.TempDir()

Callers

nothing calls this directly

Calls 2

newApiRespFunction · 0.85
SaveResponseFunction · 0.85

Tested by

no test coverage detected