mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
26 lines
440 B
Go
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)
|
|
}
|