1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
goreleaser/pipeline/git/log_test.go

26 lines
440 B
Go
Raw Normal View History

2016-12-31 13:27:37 -02:00
package git
import (
"testing"
2016-12-31 14:07:58 -02:00
2016-12-31 13:27:37 -02:00
"github.com/stretchr/testify/assert"
)
func TestLog(t *testing.T) {
assert := assert.New(t)
2017-01-15 15:03:12 -02:00
tag, err := currentTag()
assert.NoError(err)
tagb, err := previousTag(tag)
assert.NoError(err)
log, err := log(tagb, tag)
2016-12-31 13:27:37 -02:00
assert.NoError(err)
assert.NotEmpty(log)
}
func TestLogInvalidRef(t *testing.T) {
assert := assert.New(t)
2017-01-14 12:34:22 -02:00
log, err := log("wtfff", "nope")
2016-12-31 13:27:37 -02:00
assert.Error(err)
assert.Empty(log)
}