1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/pipeline/git/log_test.go
Carlos Alexandro Becker 9a7277c4ae
improved test
2017-01-15 15:03:12 -02:00

26 lines
440 B
Go

package git
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestLog(t *testing.T) {
assert := assert.New(t)
tag, err := currentTag()
assert.NoError(err)
tagb, err := previousTag(tag)
assert.NoError(err)
log, err := log(tagb, tag)
assert.NoError(err)
assert.NotEmpty(log)
}
func TestLogInvalidRef(t *testing.T) {
assert := assert.New(t)
log, err := log("wtfff", "nope")
assert.Error(err)
assert.Empty(log)
}