mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-28 06:42:49 +00:00
Call SecurityContextHolder.clearContext() in tear down of HttpSessionSecurityContextRepositoryTests
This commit is contained in:
parent
3679227b11
commit
21f2991ab4
@ -3,6 +3,7 @@ package org.springframework.security.web.context;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.springframework.security.web.context.HttpSessionSecurityContextRepository.*;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
@ -19,6 +20,11 @@ import org.springframework.security.web.context.SaveContextOnUpdateOrErrorRespon
|
||||
public class HttpSessionSecurityContextRepositoryTests {
|
||||
private final TestingAuthenticationToken testToken = new TestingAuthenticationToken("someone", "passwd", "ROLE_A");
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
SecurityContextHolder.clearContext();
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Deprecated
|
||||
public void detectsInvalidContextClass() throws Exception {
|
||||
|
Loading…
x
Reference in New Issue
Block a user