summaryrefslogtreecommitdiff
path: root/plugins/jobs/pipeline/pipeline_test.go
blob: 4482c70d851054305515674de9c88fcac3d0fb77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package pipeline

import (
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestPipeline_String(t *testing.T) {
	pipe := Pipeline{"value": "value"}

	assert.Equal(t, "value", pipe.String("value", ""))
	assert.Equal(t, "value", pipe.String("other", "value"))
}

func TestPipeline_Has(t *testing.T) {
	pipe := Pipeline{"options": map[string]interface{}{"ttl": 10}}

	assert.Equal(t, true, pipe.Has("options"))
	assert.Equal(t, false, pipe.Has("other"))
}