Skip to content

Commit

Permalink
Fix broken tests in SockJsServiceTests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Nov 28, 2022
1 parent 0a73141 commit 164141a
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -226,15 +226,15 @@ void handleIframeRequest() throws IOException {
resetResponseAndHandleRequest("GET", "/echo/iframe.html", HttpStatus.OK);

assertThat(this.servletResponse.getContentType()).isEqualTo("text/html;charset=UTF-8");
assertThat(this.servletResponse.getContentAsString().startsWith("<!DOCTYPE html>\n")).isTrue();
assertThat(this.servletResponse.getContentLength()).isEqualTo(479);
assertThat(this.servletResponse.getContentAsString()).startsWith("<!DOCTYPE html>\n");
assertThat(this.servletResponse.getContentLength()).isEqualTo(509);
assertThat(this.response.getHeaders().getCacheControl()).isEqualTo("no-store, no-cache, must-revalidate, max-age=0");
assertThat(this.response.getHeaders().getETag()).isEqualTo("\"096aaf2482e2a85effc0ab65a61993ae0\"");
assertThat(this.response.getHeaders().getETag()).isEqualTo("\"0a909c1cfbe0deb55f142095f4149eed4\"");
}

@Test
void handleIframeRequestNotModified() {
this.servletRequest.addHeader("If-None-Match", "\"096aaf2482e2a85effc0ab65a61993ae0\"");
this.servletRequest.addHeader("If-None-Match", "\"0a909c1cfbe0deb55f142095f4149eed4\"");
resetResponseAndHandleRequest("GET", "/echo/iframe.html", HttpStatus.NOT_MODIFIED);
}

Expand Down

0 comments on commit 164141a

Please sign in to comment.