NIHVIVO-3523 Set up an empty PermissionRegistry for the unit test.

This commit is contained in:
j2blake 2011-12-20 21:54:09 +00:00
parent e72cd6a78b
commit 24e1c7cfd8

View file

@ -37,6 +37,8 @@ import edu.cornell.mannlib.vedit.beans.LoginStatusBean.AuthenticationSource;
import edu.cornell.mannlib.vitro.testing.AbstractTestClass; import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
import edu.cornell.mannlib.vitro.webapp.auth.identifier.ActiveIdentifierBundleFactories; import edu.cornell.mannlib.vitro.webapp.auth.identifier.ActiveIdentifierBundleFactories;
import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.CommonIdentifierBundleFactory; import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.CommonIdentifierBundleFactory;
import edu.cornell.mannlib.vitro.webapp.auth.permissions.Permission;
import edu.cornell.mannlib.vitro.webapp.auth.permissions.PermissionRegistry;
import edu.cornell.mannlib.vitro.webapp.beans.UserAccount; import edu.cornell.mannlib.vitro.webapp.beans.UserAccount;
import edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties; import edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties;
import edu.cornell.mannlib.vitro.webapp.controller.authenticate.Authenticator; import edu.cornell.mannlib.vitro.webapp.controller.authenticate.Authenticator;
@ -151,6 +153,9 @@ public class AuthenticateTest extends AbstractTestClass {
response = new HttpServletResponseStub(); response = new HttpServletResponseStub();
PermissionRegistry.createRegistry(servletContext,
Collections.<Permission> emptySet());
auth = new Authenticate(); auth = new Authenticate();
auth.init(servletConfig); auth.init(servletConfig);