diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/patch/operation/ldn/NotifyServiceInboundPatternsRemoveOperation.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/patch/operation/ldn/NotifyServiceInboundPatternsRemoveOperation.java index 76890f792ea..2ff00dcab58 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/patch/operation/ldn/NotifyServiceInboundPatternsRemoveOperation.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/patch/operation/ldn/NotifyServiceInboundPatternsRemoveOperation.java @@ -66,6 +66,6 @@ public boolean supports(Object objectToMatch, Operation operation) { String path = operation.getPath().trim(); return (objectToMatch instanceof NotifyServiceEntity && operation.getOp().trim().equalsIgnoreCase(OPERATION_REMOVE) && - path.startsWith(OPERATION_PATH)); + path.startsWith(OPERATION_PATH) && path.endsWith(OPERATION_PATH)); } } diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/NotifyServiceRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/NotifyServiceRestRepositoryIT.java index 5c6d394ffda..6ea0d890b92 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/NotifyServiceRestRepositoryIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/NotifyServiceRestRepositoryIT.java @@ -1266,8 +1266,7 @@ public void NotifyServiceInboundPatternConstraintReplaceOperationBadRequestTest( .andExpect(status().isBadRequest()); } - // Temporarily disable. See: https://github.com/DSpace/DSpace/issues/9457 - @Ignore + @Test public void NotifyServiceInboundPatternConstraintRemoveOperationTest() throws Exception { @@ -1332,8 +1331,6 @@ public void NotifyServiceInboundPatternConstraintRemoveOperationTest() throws Ex ))); } - // Temporarily disable. See: https://github.com/DSpace/DSpace/issues/9457 - @Ignore @Test public void NotifyServiceInboundPatternConstraintRemoveOperationBadRequestTest() throws Exception {