github.com/sergiusens/goreleaser@v0.34.3-0.20171009111917-ae6f7c157c5c/pipeline/pipe_test.go (about)

     1  package pipeline
     2  
     3  import (
     4  	"errors"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func TestSkipPipe(t *testing.T) {
    11  	var reason = "this is a test"
    12  	var err = Skip(reason)
    13  	assert.Error(t, err)
    14  	assert.Equal(t, reason, err.Error())
    15  }
    16  
    17  func TestIsSkip(t *testing.T) {
    18  	assert.True(t, IsSkip(Skip("whatever")))
    19  	assert.False(t, IsSkip(errors.New("nope")))
    20  }