Skip to content

Commit

Permalink
Fix SockJsServiceTests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Nov 28, 2022
1 parent eee50d3 commit 5e55558
Showing 1 changed file with 5 additions and 5 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -238,15 +238,15 @@ public 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(490);
assertThat(this.servletResponse.getContentAsString()).startsWith("<!DOCTYPE html>\n");
assertThat(this.servletResponse.getContentLength()).isEqualTo(521);
assertThat(this.response.getHeaders().getCacheControl()).isEqualTo("no-store, no-cache, must-revalidate, max-age=0");
assertThat(this.response.getHeaders().getETag()).isEqualTo("\"0096cbd37f2a5218c33bb0826a7c74cbf\"");
assertThat(this.response.getHeaders().getETag()).isEqualTo("\"0172bf7bc7472c0cc35c02f883e779485\"");
}

@Test
public void handleIframeRequestNotModified() {
this.servletRequest.addHeader("If-None-Match", "\"0096cbd37f2a5218c33bb0826a7c74cbf\"");
this.servletRequest.addHeader("If-None-Match", "\"0172bf7bc7472c0cc35c02f883e779485\"");
resetResponseAndHandleRequest("GET", "/echo/iframe.html", HttpStatus.NOT_MODIFIED);
}

Expand Down

0 comments on commit 5e55558

Please sign in to comment.