diff --git a/cmd/docs_test.go b/cmd/docs_test.go index 551a416..57b2c61 100644 --- a/cmd/docs_test.go +++ b/cmd/docs_test.go @@ -2,6 +2,7 @@ package cmd import ( "bytes" + "os" "testing" ) @@ -10,8 +11,14 @@ func TestDocsAction(t *testing.T) { tempDir := t.TempDir() out := bytes.NewBufferString("") - err := docsAction(out, "/tmp/jntpdn-test") + err := docsAction(out, tempDir) if err != nil { t.Fatalf("Expected \"%s\"; got \"%s\". tempDir = \"%s\"", "nil", out.String(), tempDir) } + + _, err = os.Stat(tempDir) + if os.IsNotExist(err) { + t.Fatalf("\"%s\" doesn't exist.", tempDir) + } + }