glide up
This commit is contained in:
16
vendor/github.com/Masterminds/sprig/flow_control_test.go
generated
vendored
Normal file
16
vendor/github.com/Masterminds/sprig/flow_control_test.go
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
package sprig
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestFail(t *testing.T) {
|
||||
const msg = "This is an error!"
|
||||
tpl := fmt.Sprintf(`{{fail "%s"}}`, msg)
|
||||
_, err := runRaw(tpl, nil)
|
||||
assert.Error(t, err)
|
||||
assert.Contains(t, err.Error(), msg)
|
||||
}
|
||||
Reference in New Issue
Block a user