Update minimum required schema to 3.1.
This commit is contained in:
@@ -11,19 +11,23 @@ import org.springframework.security.config.util.InMemoryXmlApplicationContext;
|
||||
* @author Luke Taylor
|
||||
* @since 3.0
|
||||
*/
|
||||
public class SecurityNamespacehandlerTests {
|
||||
public class SecurityNamespaceHandlerTests {
|
||||
@Test
|
||||
public void constructionSucceeds() {
|
||||
new SecurityNamespaceHandler();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pre3SchemaAreNotSupported() throws Exception {
|
||||
public void pre31SchemaAreNotSupported() throws Exception {
|
||||
try {
|
||||
new InMemoryXmlApplicationContext(
|
||||
"<user-service id='us'>" +
|
||||
" <user name='bob' password='bobspassword' authorities='ROLE_A' />" +
|
||||
"</user-service>", "2.0.4", null
|
||||
"</user-service>", "3.0.3", null
|
||||
);
|
||||
fail("Expected BeanDefinitionParsingException");
|
||||
} catch (BeanDefinitionParsingException expected) {
|
||||
assertTrue(expected.getMessage().contains("You cannot use a spring-security-2.0.xsd schema"));
|
||||
assertTrue(expected.getMessage().contains("You cannot use a spring-security-2.0.xsd or"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,13 +34,13 @@ public class AuthenticationManagerBeanDefinitionParserTests {
|
||||
@Test
|
||||
// SEC-1225
|
||||
public void providersAreRegisteredAsTopLevelBeans() throws Exception {
|
||||
setContext(CONTEXT, "3.0");
|
||||
setContext(CONTEXT, "3.1");
|
||||
assertEquals(1, appContext.getBeansOfType(AuthenticationProvider.class).size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void eventsArePublishedByDefault() throws Exception {
|
||||
setContext(CONTEXT, "3.0");
|
||||
setContext(CONTEXT, "3.1");
|
||||
AuthListener listener = new AuthListener();
|
||||
appContext.addApplicationListener(listener);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user