Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BettyB979 committed Dec 20, 2023
1 parent bf4f843 commit a01a764
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public ResponseEntity<SourceCompleteDto> putSource(@PathVariable("id") String id

@Operation(summary = "Delete a source, its surveys, campaigns, partitionings, questionings ...")
@DeleteMapping(value = Constants.API_SOURCES_ID)
@ResponseStatus(HttpStatus.NO_CONTENT)
@Transactional
public void deleteSource(@PathVariable("id") String id) {
int nbQuestioningDeleted = 0, nbViewDeleted = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public ResponseEntity<SurveyDto> putSurvey(@PathVariable("id") String id, @Reque

@Operation(summary = "Delete a survey, its campaigns, partitionings, questionings ...")
@DeleteMapping(value = Constants.API_SURVEYS_ID)
@ResponseStatus(HttpStatus.NO_CONTENT)
@Transactional
public void deleteSurvey(@PathVariable("id") String id) {
Survey survey = surveyService.findById(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void putContactCreateUpdateDelete() throws Exception {
assertTrue(contactEventService.findContactEventsByContact(contactFoundAfterUpdate).isEmpty());

// delete contact not found
mockMvc.perform(delete("/contacts/" + identifier).contentType(MediaType.APPLICATION_JSON))
mockMvc.perform(delete(Constants.API_CONTACTS + identifier).contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isNotFound());

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void putUserCreateUpdateDelete() throws Exception {
assertTrue(userEventService.findUserEventsByUser(userFoundAfterUpdate).isEmpty());

// delete user not found
mockMvc.perform(delete("/users/" + identifier).contentType(MediaType.APPLICATION_JSON))
mockMvc.perform(delete(Constants.API_USERS_ID, identifier).contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isNotFound());

}
Expand Down

0 comments on commit a01a764

Please sign in to comment.