found another bug in standalone subscriptions
@@ -45,4 +45,14 @@ public class StandaloneSubscriptionMessageHandlerTest extends BaseSubscriptionDs
Mockito.verify(mySubscriptionRegistry, never()).registerSubscriptionUnlessAlreadyRegistered(any());
Mockito.verify(mySubscriptionMatchingSubscriber).matchActiveSubscriptionsAndDeliver(any());
}
+
+ @Test
+ public void deleteSubscription() {
+ Subscription subscription = makeSubscriptionWithStatus("testCriteria", "testPayload", "testEndpoint", Subscription.SubscriptionStatus.REQUESTED);
+ ResourceModifiedMessage message = new ResourceModifiedMessage(myFhirContext, subscription, ResourceModifiedMessage.OperationTypeEnum.DELETE);
+ ResourceModifiedJsonMessage jsonMessage = new ResourceModifiedJsonMessage(message);
+ myStandaloneSubscriptionMessageHandler.handleMessage(jsonMessage);
+ Mockito.verify(mySubscriptionRegistry, never()).registerSubscriptionUnlessAlreadyRegistered(any());
+ Mockito.verify(mySubscriptionMatchingSubscriber).matchActiveSubscriptionsAndDeliver(any());
+ }
}
