@@ -51,7 +51,7 @@ void setup() {
51
51
52
52
@ Test
53
53
void loginShouldSaveSecurityContextAsJson () throws Exception {
54
- Cookie sessionCookie = this .mvc .perform (formLogin ().user ("user " ).password ("password" ))
54
+ Cookie sessionCookie = this .mvc .perform (formLogin ().user ("rüdiger " ).password ("password" ))
55
55
.andExpect (authenticated ())
56
56
.andReturn ()
57
57
.getResponse ()
@@ -66,20 +66,20 @@ void loginShouldSaveSecurityContextAsJson() throws Exception {
66
66
SecurityContext securityContext = this .objectMapperWithModules .readValue ((String ) attributeBytes ,
67
67
SecurityContext .class );
68
68
assertThat (securityContext ).isNotNull ();
69
- assertThat (securityContext .getAuthentication ().getName ()).isEqualTo ("user " );
69
+ assertThat (securityContext .getAuthentication ().getName ()).isEqualTo ("rüdiger " );
70
70
}
71
71
72
72
@ Test
73
73
void loginWhenQueryUsingJsonbOperatorThenReturns () throws Exception {
74
- this .mvc .perform (formLogin ().user ("user " ).password ("password" )).andExpect (authenticated ());
74
+ this .mvc .perform (formLogin ().user ("rüdiger " ).password ("password" )).andExpect (authenticated ());
75
75
Object attributeBytes = this .jdbcClient .sql ("""
76
76
SELECT attribute_bytes::text FROM spring_session_attributes
77
- WHERE attribute_bytes -> 'authentication' -> 'principal' ->> 'username' = 'user '
77
+ WHERE attribute_bytes -> 'authentication' -> 'principal' ->> 'username' = 'rüdiger '
78
78
""" ).query ().singleValue ();
79
79
SecurityContext securityContext = this .objectMapperWithModules .readValue ((String ) attributeBytes ,
80
80
SecurityContext .class );
81
81
assertThat (securityContext ).isNotNull ();
82
- assertThat (securityContext .getAuthentication ().getName ()).isEqualTo ("user " );
82
+ assertThat (securityContext .getAuthentication ().getName ()).isEqualTo ("rüdiger " );
83
83
}
84
84
85
85
}
0 commit comments