We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8aea874 commit e1fd486Copy full SHA for e1fd486
util/apiwarnings/handler_test.go
@@ -80,12 +80,11 @@ func TestDiscardMatchingHandler(t *testing.T) {
80
}
81
82
83
-func TestDiscardMatchingHandler_NilLogger(t *testing.T) {
+func TestDiscardMatchingHandler_uninitialized(t *testing.T) {
84
g := NewWithT(t)
85
- h := DiscardMatchingHandler{
86
- // Logger is nil
87
- }
+ h := DiscardMatchingHandler{}
88
g.Expect(func() {
89
- h.HandleWarningHeader(0, "", "")
+ // Together, the code and message value ensure that the handler logs the message.
+ h.HandleWarningHeader(299, "", "example")
90
}).ToNot(Panic())
91
0 commit comments