From 8ca8809d0daadcf3b27fefef28d74a93eb7a541f Mon Sep 17 00:00:00 2001
From: Carlos Alexandro Becker <caarlos0@gmail.com>
Date: Fri, 14 Apr 2017 15:49:37 -0300
Subject: [PATCH] more brew tests

---
 pipeline/brew/brew_test.go | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/pipeline/brew/brew_test.go b/pipeline/brew/brew_test.go
index 292f0e587..9d64a66f0 100644
--- a/pipeline/brew/brew_test.go
+++ b/pipeline/brew/brew_test.go
@@ -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
 }