Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
JAndrewCH committed Jan 2, 2024
1 parent fdef200 commit cf8f233
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ void deletePSCWhenNoApiKeyPresent() throws Exception {
void callPscDeleteRequest() throws Exception {

doNothing()
.when(companyPscService).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID, "");
.when(companyPscService).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID, X_REQUEST_ID);

mockMvc.perform(delete(DELETE_URL)
.header("ERIC-Identity", ERIC_IDENTITY)
Expand All @@ -360,7 +360,7 @@ void callPscDeleteRequest() throws Exception {
.header("ERIC-Authorised-Key-Privileges", ERIC_AUTH))
.andExpect(status().isOk());

verify(companyPscService,times(1)).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID,"");
verify(companyPscService,times(1)).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID,X_REQUEST_ID);
}

@Test
Expand All @@ -385,7 +385,7 @@ void callPscDeleteRequestAndReturn404() throws Exception {
void callPscDeleteRequestWhenServiceUnavailableAndReturn503() throws Exception {

doThrow(ServiceUnavailableException.class)
.when(companyPscService).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID,"");
.when(companyPscService).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID,X_REQUEST_ID);

mockMvc.perform(delete(DELETE_URL)
.header("ERIC-Identity", ERIC_IDENTITY)
Expand Down

0 comments on commit cf8f233

Please sign in to comment.