MCPcopy Create free account
hub / github.com/dropbox/dbxcli / TestPutStdin_RejectsDirectoryStyleTarget

Function TestPutStdin_RejectsDirectoryStyleTarget

cmd/pipe_test.go:55–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestPutStdin_RejectsDirectoryStyleTarget(t *testing.T) {
56 cmd := testPutCmdWithStdin(strings.NewReader("data"))
57 err := put(cmd, []string{"-", "/folder/"})
58 if err == nil {
59 t.Fatal("expected error for directory-style target")
60 }
61 if !strings.Contains(err.Error(), "directory target") {
62 t.Errorf("error = %q, want mention of directory target", err.Error())
63 }
64}
65
66func TestPutStdin_RejectsExistingFolder(t *testing.T) {
67 cmd := testPutCmdWithStdin(strings.NewReader("data"))

Callers

nothing calls this directly

Calls 3

testPutCmdWithStdinFunction · 0.85
putFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected