Browse Source

Merge branch '3.4.x'

pull/44500/head
Andy Wilkinson 11 months ago
parent
commit
2f73406dff
  1. 4
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafReactiveAutoConfigurationTests.java
  2. 4
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafServletAutoConfigurationTests.java

4
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafReactiveAutoConfigurationTests.java

@ -214,7 +214,7 @@ class ThymeleafReactiveAutoConfigurationTests { @@ -214,7 +214,7 @@ class ThymeleafReactiveAutoConfigurationTests {
@Test
@WithResource(name = "templates/security-dialect.html",
content = "<html><body><div sec:authentication=\"name\"></div></body></html>\n")
content = "<html><body><div sec:authentication=\"name\"></div></body></html>")
void useSecurityDialect() {
this.contextRunner.run((context) -> {
ISpringWebFluxTemplateEngine engine = context.getBean(ISpringWebFluxTemplateEngine.class);
@ -225,7 +225,7 @@ class ThymeleafReactiveAutoConfigurationTests { @@ -225,7 +225,7 @@ class ThymeleafReactiveAutoConfigurationTests {
WebContext attrs = new WebContext(SpringWebFluxWebApplication.buildApplication(null)
.buildExchange(exchange, Locale.US, MediaType.TEXT_HTML, StandardCharsets.UTF_8));
String result = engine.process("security-dialect", attrs);
assertThat(result).isEqualTo("<html><body><div>alice</div></body></html>" + System.lineSeparator());
assertThat(result).isEqualTo("<html><body><div>alice</div></body></html>");
});
}

4
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafServletAutoConfigurationTests.java

@ -239,7 +239,7 @@ class ThymeleafServletAutoConfigurationTests { @@ -239,7 +239,7 @@ class ThymeleafServletAutoConfigurationTests {
@Test
@WithResource(name = "templates/security-dialect.html",
content = "<html><body><div sec:authentication=\"name\"></div></body></html>\n")
content = "<html><body><div sec:authentication=\"name\"></div></body></html>")
void useSecurityDialect() {
this.contextRunner.run((context) -> {
TemplateEngine engine = context.getBean(TemplateEngine.class);
@ -251,7 +251,7 @@ class ThymeleafServletAutoConfigurationTests { @@ -251,7 +251,7 @@ class ThymeleafServletAutoConfigurationTests {
SecurityContextHolder
.setContext(new SecurityContextImpl(new TestingAuthenticationToken("alice", "admin")));
String result = engine.process("security-dialect", attrs);
assertThat(result).isEqualTo("<html><body><div>alice</div></body></html>" + System.lineSeparator());
assertThat(result).isEqualTo("<html><body><div>alice</div></body></html>");
}
finally {
SecurityContextHolder.clearContext();

Loading…
Cancel
Save