File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/test/java/uk/gov/hmcts/cp/subscription/integration Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 77import uk .gov .hmcts .cp .subscription .entities .ClientSubscriptionEntity ;
88import uk .gov .hmcts .cp .subscription .model .EntityEventType ;
99
10+ import java .time .format .DateTimeFormatter ;
1011import java .util .List ;
1112
1213import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .put ;
@@ -24,6 +25,7 @@ void beforeEach() {
2425 @ Test
2526 void update_client_subscription_should_update_subscription () throws Exception {
2627 ClientSubscriptionEntity existing = insertSubscription ("https://oldendpoint" , List .of (EntityEventType .PCR ));
28+ String existingCreatedAt = existing .getCreatedAt ().format (DateTimeFormatter .ISO_LOCAL_DATE_TIME );
2729 String body = new ObjectMapper ().writeValueAsString (request );
2830 mockMvc .perform (put ("/client-subscriptions/{id}" , existing .getId ())
2931 .contentType (MediaType .APPLICATION_JSON )
@@ -35,6 +37,6 @@ void update_client_subscription_should_update_subscription() throws Exception {
3537 .andExpect (jsonPath ("$.eventTypes.[0]" ).value ("CUSTODIAL_RESULT" ))
3638 .andExpect (jsonPath ("$.eventTypes.[1]" ).value ("PCR" ))
3739 .andExpect (jsonPath ("$.notificationEndpoint.webhookUrl" ).value ("https://my-callback-url" ))
38- .andExpect (jsonPath ("$.createdAt" ).value (existing . getCreatedAt (). toString () ));
40+ .andExpect (jsonPath ("$.createdAt" ).value (existingCreatedAt + "Z" ));
3941 }
4042}
You can’t perform that action at this time.
0 commit comments