Skip to content

Commit 73b992d

Browse files
authored
Merge pull request #230 from ARMS2025/resolve-mismatch-stubbings-2
Resolved mismatch stubbings in VetRestControllerTests.java
2 parents 186ef0f + 123ef4f commit 73b992d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/org/springframework/samples/petclinic/rest/controller/VetRestControllerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void testGetVetSuccess() throws Exception {
106106
@Test
107107
@WithMockUser(roles="VET_ADMIN")
108108
void testGetVetNotFound() throws Exception {
109-
given(this.clinicService.findVetById(-1)).willReturn(null);
109+
given(this.clinicService.findVetById(999)).willReturn(null);
110110
this.mockMvc.perform(get("/api/vets/999")
111111
.accept(MediaType.APPLICATION_JSON))
112112
.andExpect(status().isNotFound());
@@ -213,7 +213,7 @@ void testDeleteVetError() throws Exception {
213213
Vet newVet = vets.get(0);
214214
ObjectMapper mapper = new ObjectMapper();
215215
String newVetAsJSON = mapper.writeValueAsString(vetMapper.toVetDto(newVet));
216-
given(this.clinicService.findVetById(-1)).willReturn(null);
216+
given(this.clinicService.findVetById(999)).willReturn(null);
217217
this.mockMvc.perform(delete("/api/vets/999")
218218
.content(newVetAsJSON).accept(MediaType.APPLICATION_JSON_VALUE).contentType(MediaType.APPLICATION_JSON_VALUE))
219219
.andExpect(status().isNotFound());

0 commit comments

Comments
 (0)