1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-25 21:29:14 +02:00

added git pipeline tests

This commit is contained in:
Carlos Alexandro Becker 2017-03-25 20:36:21 -03:00
parent 9a71fba785
commit 03bae3d4da
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

21
pipeline/git/git_test.go Normal file
View File

@ -0,0 +1,21 @@
package git
import (
"testing"
"github.com/goreleaser/goreleaser/config"
"github.com/goreleaser/goreleaser/context"
"github.com/stretchr/testify/assert"
)
func TestValidVersion(t *testing.T) {
assert := assert.New(t)
var ctx = &context.Context{
Config: config.Project{},
}
assert.NoError(Pipe{}.Run(ctx))
assert.NotEmpty(ctx.Git.CurrentTag)
assert.NotEmpty(ctx.Git.PreviousTag)
assert.NotEmpty(ctx.Git.Diff)
}