finish user context switch event publishing
This commit is contained in:
@@ -22,7 +22,6 @@ import net.sf.acegisecurity.GrantedAuthority;
|
||||
import net.sf.acegisecurity.GrantedAuthorityImpl;
|
||||
import net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import net.sf.acegisecurity.providers.dao.User;
|
||||
import net.sf.acegisecurity.ui.switchuser.SwitchUserGrantedAuthority;
|
||||
|
||||
|
||||
/**
|
||||
@@ -92,13 +91,13 @@ public class AuthenticationEventTests extends TestCase {
|
||||
public void testSwitchUserContextEvent() {
|
||||
Authentication auth = getAuthentication();
|
||||
User targetUser = getUser();
|
||||
|
||||
|
||||
AuthenticationSwitchUserEvent event = new AuthenticationSwitchUserEvent(auth,
|
||||
targetUser);
|
||||
assertEquals(auth, event.getAuthentication());
|
||||
assertEquals(targetUser, event.getUser());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private Authentication getAuthentication() {
|
||||
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken("Principal",
|
||||
"Credentials");
|
||||
|
||||
Reference in New Issue
Block a user