From f2f1ad8d6ba46597aefaabe8f3205e5d351d8153 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 11 Apr 2017 16:58:51 +0200 Subject: [PATCH] fix test break --- proxy/http/server_test.go | 2 +- testing/assert/string.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/proxy/http/server_test.go b/proxy/http/server_test.go index 579b6830..de07658a 100644 --- a/proxy/http/server_test.go +++ b/proxy/http/server_test.go @@ -39,7 +39,7 @@ Accept-Language: de,en;q=0.7,en-us;q=0.3 assert.String(req.Header.Get("Proxy-Authenticate")).Equals("abc") StripHopByHopHeaders(req.Header) - assert.String(req.Header.Get("Connection")).Equals("close") + assert.String(req.Header.Get("Connection")).IsEmpty() assert.String(req.Header.Get("Foo")).Equals("") assert.String(req.Header.Get("Bar")).Equals("") assert.String(req.Header.Get("Proxy-Connection")).Equals("") diff --git a/testing/assert/string.go b/testing/assert/string.go index 9c3b0504..30a6726d 100644 --- a/testing/assert/string.go +++ b/testing/assert/string.go @@ -42,3 +42,9 @@ func (subject *StringSubject) NotContains(substring string) { subject.Fail("doesn't contain", substring) } } + +func (subject *StringSubject) IsEmpty() { + if len(subject.value) > 0 { + subject.FailWithMessage("is not empty.") + } +}