Skip to content

Commit

Permalink
Minor test fixing (url was not consistent with the last modification on
Browse files Browse the repository at this point in the history
the Vets controlller.
  • Loading branch information
japarejo committed Jan 31, 2020
1 parent 5b32dc5 commit bbfd2fb
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,9 @@ void setup() {
@WithMockUser(value = "spring")
@Test
void testShowVetListHtml() throws Exception {
mockMvc.perform(get("/vets.html")).andExpect(status().isOk()).andExpect(model().attributeExists("vets"))
mockMvc.perform(get("/vets")).andExpect(status().isOk()).andExpect(model().attributeExists("vets"))
.andExpect(view().name("vets/vetList"));
}

@WithMockUser(value = "spring")
@Test
void testShowResourcesVetList() throws Exception {
ResultActions actions = mockMvc.perform(get("/vets.json").accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk());
actions.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andExpect(jsonPath("$.vetList[0].id").value(1));
}
}

@WithMockUser(value = "spring")
@Test
Expand Down

0 comments on commit bbfd2fb

Please sign in to comment.