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:
parent
aae42e96d7
commit
b7690e6513
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user