1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00
goreleaser/internal/deprecate/deprecate_test.go
2018-05-01 20:32:46 -07:00

25 lines
607 B
Go

package deprecate
import (
"bytes"
"testing"
"github.com/stretchr/testify/assert"
"github.com/apex/log"
"github.com/apex/log/handlers/cli"
)
func TestNotice(t *testing.T) {
var out bytes.Buffer
cli.Default.Writer = &out
log.SetHandler(cli.Default)
log.Info("first")
Notice("foo.bar.whatever")
log.Info("last")
assert.Contains(t, out.String(), " • first")
assert.Contains(t, out.String(), " • DEPRECATED: `foo.bar.whatever` should not be used anymore, check https://goreleaser.com/deprecations#foo-bar-whatever for more info.")
assert.Contains(t, out.String(), " • last")
}