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

added more tests to the git pipe

This commit is contained in:
Carlos Alexandro Becker 2017-04-22 10:46:58 -03:00
parent d04efee12d
commit 881bba915b
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -102,6 +102,22 @@ func TestTagIsNotLastCommit(t *testing.T) {
assert.Contains(err.Error(), "git tag v0.0.1 was not made against commit")
}
func TestValidState(t *testing.T) {
var assert = assert.New(t)
_, back := createAndChdir(t)
defer back()
gitInit(t)
gitCommit(t, "commit3")
gitTag(t, "v0.0.1")
gitCommit(t, "commit4")
gitTag(t, "v0.0.2")
var ctx = &context.Context{
Config: config.Project{},
Validate: true,
}
assert.NoError(Pipe{}.Run(ctx))
}
func TestNoValidate(t *testing.T) {
var assert = assert.New(t)
_, back := createAndChdir(t)