OnCommitedResponseWrapper commits when buffer exceeded

Fixes #26
This commit is contained in:
Rob Winch
2014-08-01 14:38:24 -05:00
parent 0d217c680a
commit 2732a183f3
2 changed files with 14 additions and 1 deletions

View File

@@ -1059,4 +1059,14 @@ public class OnCommittedResponseWrapperTests {
assertThat(committed).isTrue();
}
@Test
public void bufferSizePrintWriterWriteCommits() throws Exception {
String expected = "1234567890";
when(response.getBufferSize()).thenReturn(expected.length());
response.getWriter().write(expected);
assertThat(committed).isTrue();
}
}