Commits

Jared Bunting committed 665f595

Eliminating misleading stacktrace in ShiroModuleTest.

  • Participants
  • Parent commits 076c3ff

Comments (0)

Files changed (1)

File src/test/java/net/peachjean/shiro/guice/ShiroModuleTest.java

 import com.google.inject.Injector;
 import com.google.inject.Provides;
 import com.google.inject.binder.AnnotatedBindingBuilder;
+import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationInfo;
 import org.apache.shiro.authc.AuthenticationToken;
         });
         SecurityManager securityManager = injector.getInstance(SecurityManager.class);
         assertNotNull(securityManager);
-
+        SecurityUtils.setSecurityManager(securityManager);
 
         final Subject subject = new Subject.Builder(securityManager).buildSubject();
         securityManager.login(subject, authToken);