mirror of
https://github.com/kataras/iris.git
synced 2025-01-24 11:11:03 +01:00
19 lines
325 B
Go
19 lines
325 B
Go
|
// black-box testing
|
||
|
package logger_test
|
||
|
|
||
|
import (
|
||
|
"bytes"
|
||
|
"testing"
|
||
|
|
||
|
"github.com/kataras/iris/core/logger"
|
||
|
)
|
||
|
|
||
|
func TestLog(t *testing.T) {
|
||
|
msg := "Hello this is me"
|
||
|
l := &bytes.Buffer{}
|
||
|
logger.Log(l, msg)
|
||
|
if expected, got := msg, l.String(); expected != got {
|
||
|
t.Fatalf("expected %s but got %s", expected, got)
|
||
|
}
|
||
|
}
|