mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-07 13:31:37 +02:00
test: fix init test
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
7a2fc10625
commit
2a3009757a
@ -54,16 +54,6 @@ func TestInitGitIgnoreExists(t *testing.T) {
|
||||
require.Equal(t, "mybinary\n\ndist/\n", string(bts))
|
||||
}
|
||||
|
||||
func TestInitFileExists(t *testing.T) {
|
||||
folder := setupInitTest(t)
|
||||
cmd := newInitCmd().cmd
|
||||
path := filepath.Join(folder, "twice.yaml")
|
||||
cmd.SetArgs([]string{"-f", path})
|
||||
require.NoError(t, cmd.Execute())
|
||||
require.EqualError(t, cmd.Execute(), "open "+path+": file exists")
|
||||
require.FileExists(t, path)
|
||||
}
|
||||
|
||||
func TestInitFileError(t *testing.T) {
|
||||
folder := setupInitTest(t)
|
||||
cmd := newInitCmd().cmd
|
||||
|
Loading…
x
Reference in New Issue
Block a user