2017-08-20 16:35:46 -03:00
|
|
|
package pipeline
|
|
|
|
|
|
|
|
import (
|
2017-09-12 00:22:02 -03:00
|
|
|
"errors"
|
2017-08-20 16:35:46 -03:00
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestSkipPipe(t *testing.T) {
|
|
|
|
var reason = "this is a test"
|
|
|
|
var err = Skip(reason)
|
2017-09-26 19:24:49 -03:00
|
|
|
assert.Error(t, err)
|
|
|
|
assert.Equal(t, reason, err.Error())
|
2017-08-20 16:35:46 -03:00
|
|
|
}
|
2017-09-12 00:22:02 -03:00
|
|
|
|
|
|
|
func TestIsSkip(t *testing.T) {
|
2017-09-26 19:24:49 -03:00
|
|
|
assert.True(t, IsSkip(Skip("whatever")))
|
|
|
|
assert.False(t, IsSkip(errors.New("nope")))
|
2017-09-12 00:22:02 -03:00
|
|
|
}
|