dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21376
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10098: FRED-API: testing for illegal verbs
------------------------------------------------------------
revno: 10098
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-03-09 11:30:36 +0300
message:
FRED-API: testing for illegal verbs
modified:
dhis-2/dhis-web/dhis-web-api-fred/src/test/java/org/hisp/dhis/web/webapi/v1/controller/FacilityControllerTest.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/test/java/org/hisp/dhis/web/webapi/v1/controller/FacilityControllerTest.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/test/java/org/hisp/dhis/web/webapi/v1/controller/FacilityControllerTest.java 2013-03-09 06:33:50 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/test/java/org/hisp/dhis/web/webapi/v1/controller/FacilityControllerTest.java 2013-03-09 08:30:36 +0000
@@ -475,4 +475,35 @@
mvc.perform( delete( "/v1/facilities/" + organisationUnit.getUuid() ).session( session ) )
.andExpect( status().isOk() );
}
+
+ //---------------------------------------------------------------------------------------------
+ // Test VERBS
+ //---------------------------------------------------------------------------------------------
+
+ @Test
+ public void testDeleteFacilities() throws Exception
+ {
+ MockHttpSession session = getSession( "ALL" );
+
+ mvc.perform( delete( "/v1/facilities" ).session( session ) )
+ .andExpect( status().isMethodNotAllowed() );
+ }
+
+ @Test
+ public void testPutFacilities() throws Exception
+ {
+ MockHttpSession session = getSession( "ALL" );
+
+ mvc.perform( put( "/v1/facilities" ).session( session ) )
+ .andExpect( status().isMethodNotAllowed() );
+ }
+
+ @Test
+ public void testPostFacilityID() throws Exception
+ {
+ MockHttpSession session = getSession( "ALL" );
+
+ mvc.perform( post( "/v1/facilities/1" ).session( session ) )
+ .andExpect( status().isMethodNotAllowed() );
+ }
}