1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

more tests

This commit is contained in:
Carlos Alexandro Becker 2016-12-29 08:53:11 -02:00
parent 5d087173b4
commit b99db9dd97
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 21 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import (
)
func CurrentTag() (tag string, err error) {
return getTag("master")
return getTag("")
}
func PreviousTag(base string) (tag string, err error) {

20
git/tag_test.go Normal file
View File

@ -0,0 +1,20 @@
package git
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCurrentTag(t *testing.T) {
assert := assert.New(t)
tag, err := CurrentTag()
assert.NoError(err)
assert.NotEmpty(tag)
}
func TestPreviousTag(t *testing.T) {
assert := assert.New(t)
tag, err := PreviousTag("v0.0.1")
assert.NoError(err)
assert.NotEmpty(tag)
}