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:
parent
d04efee12d
commit
881bba915b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user