1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-05-15 22:26:44 +02:00
Carlos Alexandro Becker d7efa64075
removed duplicated code
2017-08-19 12:47:04 -03:00

27 lines
589 B
Go

package git_test
import (
"testing"
"github.com/goreleaser/goreleaser/internal/git"
"github.com/goreleaser/goreleaser/internal/testlib"
"github.com/stretchr/testify/assert"
)
func TestGit(t *testing.T) {
var assert = assert.New(t)
_, back := testlib.Mktmp(t)
defer back()
out, err := git.Run("init")
assert.NoError(err)
assert.Contains(out, "Initialized empty Git repository")
out, err = git.Run("command-that-dont-exist")
assert.Error(err)
assert.Empty(out)
assert.Equal(
"git: 'command-that-dont-exist' is not a git command. See 'git --help'.\n",
err.Error(),
)
}