Fix bug for when custom page is large enough

Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
mpl 2022-04-20 16:42:09 +02:00 committed by GitHub
parent a9fe3f98c5
commit 0ecd85cc66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 65 additions and 106 deletions

View file

@ -180,12 +180,12 @@ func TestNewResponseRecorder(t *testing.T) {
{
desc: "Without Close Notify",
rw: httptest.NewRecorder(),
expected: &responseRecorderWithoutCloseNotify{},
expected: &codeModifierWithoutCloseNotify{},
},
{
desc: "With Close Notify",
rw: &mockRWCloseNotify{},
expected: &responseRecorderWithCloseNotify{},
expected: &codeModifierWithCloseNotify{},
},
}
@ -194,7 +194,7 @@ func TestNewResponseRecorder(t *testing.T) {
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
rec := newResponseRecorder(context.Background(), test.rw)
rec := newCodeModifier(test.rw, 0)
assert.IsType(t, rec, test.expected)
})
}