mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-11-27 16:24:04 +00:00
Avoid testing log output
This commit is contained in:
parent
33d706d401
commit
86a0d413ad
1 changed files with 5 additions and 3 deletions
|
@ -27,11 +27,13 @@ func TestProtocol(t *testing.T) {
|
|||
handlerCalled := false
|
||||
proto.LogHandler = func(message string, args ...interface{}) {
|
||||
handlerCalled = true
|
||||
So(message, ShouldEqual, "[PROTO: %s] Started session, switching to ESTABLISH state")
|
||||
So(len(args), ShouldEqual, 1)
|
||||
So(message, ShouldEqual, "[PROTO: %s] Test message %s %s")
|
||||
So(len(args), ShouldEqual, 3)
|
||||
So(args[0], ShouldEqual, "INVALID")
|
||||
So(args[1], ShouldEqual, "test arg 1")
|
||||
So(args[2], ShouldEqual, "test arg 2")
|
||||
}
|
||||
proto.Start()
|
||||
proto.logf("Test message %s %s", "test arg 1", "test arg 2")
|
||||
So(handlerCalled, ShouldBeTrue)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue