Skip to content

Commit e804c73

Browse files
joeybloggsjoeybloggs
authored andcommitted
update syslog_test.go to use table driven tests.
1 parent 4d405cb commit e804c73

File tree

2 files changed

+708
-642
lines changed

2 files changed

+708
-642
lines changed

handlers/console/console_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"testing"
77

88
"github.com/go-playground/log"
9-
. "gopkg.in/go-playground/assert.v1"
109
)
1110

1211
// NOTES:
@@ -22,6 +21,7 @@ import (
2221
func TestConsoleLogger(t *testing.T) {
2322

2423
tests := getConsoleLoggerTests()
24+
2525
buff := new(bytes.Buffer)
2626

2727
cLog := New()
@@ -230,7 +230,9 @@ func TestCustomFormatFunc(t *testing.T) {
230230
log.RegisterHandler(cLog, log.AllLevels...)
231231

232232
log.Debug("debug")
233-
Equal(t, buff.String(), "debug")
233+
if buff.String() != "debug" {
234+
log.Errorf("Expected '%s' Got '%s'", "debug", buff.String())
235+
}
234236
buff.Reset()
235237
}
236238

0 commit comments

Comments
 (0)