1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

test: test for artifact-only key with no artifacts

This commit is contained in:
Carlos Alexandro Becker 2018-07-08 22:32:21 -07:00
parent aae42e96d7
commit b7690e6513
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -62,6 +62,13 @@ func TestWithArtifact(t *testing.T) {
assert.NoError(tt, err)
assert.Equal(tt, ctx.Config.ProjectName, result)
})
t.Run("template using artifact fields with no artifact", func(tt *testing.T) {
tt.Parallel()
result, err := New(ctx).Apply("{{ .Os }}")
assert.EqualError(tt, err, `template: tmpl:1:3: executing "tmpl" at <.Os>: map has no entry for key "Os"`)
assert.Empty(tt, result)
})
}
func TestEnv(t *testing.T) {