github.com/ianfoo/lab@v0.9.5-0.20180123060006-5ed79f2ccfc7/cmd/issueShow_test.go (about) 1 package cmd 2 3 import ( 4 "os/exec" 5 "testing" 6 7 "github.com/stretchr/testify/require" 8 ) 9 10 func Test_issueShow(t *testing.T) { 11 t.Parallel() 12 repo := copyTestRepo(t) 13 cmd := exec.Command("../lab_bin", "issue", "1") 14 cmd.Dir = repo 15 16 b, err := cmd.CombinedOutput() 17 if err != nil { 18 t.Log(string(b)) 19 t.Error(err) 20 } 21 22 require.Contains(t, string(b), ` 23 #1 test issue for lab list 24 =================================== 25 26 ----------------------------------- 27 Project: zaquestion/test 28 Status: Open 29 Assignees: zaquestion, lab-testing 30 Author: lab-testing 31 Milestone: 1.0 32 Due Date: 2018-01-01 00:00:00 +0000 UTC 33 Time Stats: Estimated 1w, Spent 1d 34 Labels: bug 35 WebURL: https://gitlab.com/zaquestion/test/issues/1 36 `) 37 }