mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 09:12:14 +00:00
SavedCookieMixinTests uses readValue(String,Object.class)
The test should not provide SavedCookie.class to the ObjectMapper since this is not done in production. In particular, it provides the type that it should be deserialized, but this must be provided in the JSON since the type is unknown at the time of deserialization. Issue gh-17006
This commit is contained in:
parent
241c3cd35a
commit
6118587ff8
@ -88,7 +88,7 @@ public class SavedCookieMixinTests extends AbstractMixinTests {
|
||||
|
||||
@Test
|
||||
public void deserializeSavedCookieJsonTest() throws IOException {
|
||||
SavedCookie savedCookie = this.mapper.readValue(COOKIE_JSON, SavedCookie.class);
|
||||
SavedCookie savedCookie = (SavedCookie) this.mapper.readValue(COOKIE_JSON, Object.class);
|
||||
assertThat(savedCookie).isNotNull();
|
||||
assertThat(savedCookie.getName()).isEqualTo("SESSION");
|
||||
assertThat(savedCookie.getValue()).isEqualTo("123456789");
|
||||
|
Loading…
x
Reference in New Issue
Block a user