Skip to content

Commit

Permalink
basic test on docs
Browse files Browse the repository at this point in the history
refs #34
  • Loading branch information
deogracia committed Nov 1, 2020
1 parent f8a8626 commit 5b0dca5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/docs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"bytes"
"os"
"testing"
)

Expand All @@ -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)
}

}

0 comments on commit 5b0dca5

Please sign in to comment.