github.com/matthewdale/lab@v0.14.0/cmd/mr_show_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_mrShow(t *testing.T) { 11 t.Parallel() 12 repo := copyTestRepo(t) 13 cmd := exec.Command("../lab_bin", "mr", "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 MR for lab list 24 =================================== 25 This MR is to remain open for testing the `+"`lab mr list`"+` functionality 26 ----------------------------------- 27 Project: zaquestion/test 28 Branches: mrtest->master 29 Status: Open 30 Assignee: zaquestion 31 Author: zaquestion 32 Milestone: 1.0 33 Labels: documentation 34 WebURL: https://gitlab.com/zaquestion/test/merge_requests/1 35 `) 36 }