github.com/matthewdale/lab@v0.14.0/cmd/issue_browse_test.go (about)

     1  package cmd
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  )
     8  
     9  func Test_issueBrowse(t *testing.T) {
    10  	oldBrowse := browse
    11  	defer func() { browse = oldBrowse }()
    12  
    13  	browse = func(url string) error {
    14  		require.Equal(t, "https://gitlab.com/zaquestion/test/issues/1", url)
    15  		return nil
    16  	}
    17  
    18  	issueBrowseCmd.Run(nil, []string{"1"})
    19  }