[java-identity-provider COMMIT] /trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingpart...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Feb 17 14:22:44 EST 2015
Author: scantor
Date: Tue Feb 17 14:22:43 2015
New Revision: 7351
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7351&view=rev
Log:
Fix failing test.
Modified:
trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ReloadMetadataTest.java
Modified: trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ReloadMetadataTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ReloadMetadataTest.java?rev=7351&r1=7350&r2=7351&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ReloadMetadataTest.java (original)
+++ trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ReloadMetadataTest.java Tue Feb 17 14:22:43 2015
@@ -67,6 +67,21 @@
ActionTestingSupport.assertEvent(event, EventIds.INVALID_PROFILE_CTX);
}
+ @Test public void serviceNotSpecified() throws ComponentInitializationException {
+ final MockHttpServletRequest request = new MockHttpServletRequest();
+ final MockHttpServletResponse response = new MockHttpServletResponse();
+
+ final ReloadMetadata action = new ReloadMetadata();
+ action.setMetadataResolver(service);
+ action.setHttpServletRequest(request);
+ action.setHttpServletResponse(response);
+ action.initialize();
+
+ final Event event = action.execute(src);
+ ActionTestingSupport.assertProceedEvent(event);
+ Assert.assertEquals(response.getStatus(), HttpServletResponse.SC_NOT_FOUND);
+ }
+
@Test public void serviceNotFound() throws ComponentInitializationException {
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
@@ -77,13 +92,9 @@
action.setHttpServletResponse(response);
action.initialize();
- Event event = action.execute(src);
- ActionTestingSupport.assertEvent(event, EventIds.INVALID_MESSAGE);
-
request.setParameter(ReloadMetadata.RESOLVER_ID, "foo");
- event = action.execute(src);
+ final Event event = action.execute(src);
ActionTestingSupport.assertProceedEvent(event);
-
Assert.assertEquals(response.getStatus(), HttpServletResponse.SC_NOT_FOUND);
}
More information about the commits
mailing list