From 86a0d413ad128c4e5baa0a0e9fe437fc49d8f0cf Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Sun, 23 Nov 2014 03:51:24 +0000 Subject: [PATCH] Avoid testing log output --- mailhog/smtp/protocol/protocol_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mailhog/smtp/protocol/protocol_test.go b/mailhog/smtp/protocol/protocol_test.go index bbdd2af..1743208 100644 --- a/mailhog/smtp/protocol/protocol_test.go +++ b/mailhog/smtp/protocol/protocol_test.go @@ -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) })