mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-24 02:09:05 +00:00
Fix Thymeleaf security dialect tests on Windows
This commit is contained in:
+2
-1
@@ -225,7 +225,8 @@ public class ThymeleafReactiveAutoConfigurationTests {
|
||||
new TestingAuthenticationToken("alice", "admin")));
|
||||
IContext attrs = new SpringWebFluxContext(exchange);
|
||||
String result = engine.process("security-dialect", attrs);
|
||||
assertThat(result).isEqualTo("<html><body><div>alice</div></body></html>\n");
|
||||
assertThat(result).isEqualTo(
|
||||
"<html><body><div>alice</div></body></html>" + System.lineSeparator());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+2
-1
@@ -229,7 +229,8 @@ public 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>\n");
|
||||
assertThat(result).isEqualTo("<html><body><div>alice</div></body></html>"
|
||||
+ System.lineSeparator());
|
||||
}
|
||||
finally {
|
||||
SecurityContextHolder.clearContext();
|
||||
|
||||
Reference in New Issue
Block a user