1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-19 20:57:53 +02:00

more brew tests

This commit is contained in:
Carlos Alexandro Becker 2017-04-14 15:49:37 -03:00
parent 3bc428120d
commit 8ca8809d0d
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -115,6 +115,34 @@ func TestRunPipe(t *testing.T) {
assert.True(client.CreatedFile)
}
func TestRunPipeBrewNotSetup(t *testing.T) {
assert := assert.New(t)
var ctx = &context.Context{
Config: config.Project{
Archive: config.Archive{
Format: "tar.gz",
},
Brew: config.Homebrew{
GitHub: config.Repo{
Owner: "test",
Name: "test",
},
},
},
}
client := &DummyClient{}
assert.Equal(ErrNoDarwin64Build, doRun(ctx, client))
assert.False(client.CreatedFile)
}
func TestRunPipeNoDarwinBuild(t *testing.T) {
assert := assert.New(t)
var ctx = &context.Context{}
client := &DummyClient{}
assert.NoError(doRun(ctx, client))
assert.False(client.CreatedFile)
}
type DummyClient struct {
CreatedFile bool
}