mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-05-21 03:19:38 +00:00
Fix broken tests
This commit is contained in:
parent
45da5a4d3b
commit
23f65ba7d0
1 changed files with 3 additions and 3 deletions
6
src/test/java/org/springframework/samples/petclinic/owner/PetControllerTests.java
Normal file → Executable file
6
src/test/java/org/springframework/samples/petclinic/owner/PetControllerTests.java
Normal file → Executable file
|
@ -75,7 +75,7 @@ public class PetControllerTests {
|
|||
mockMvc.perform(post("/owners/{ownerId}/pets/new", TEST_OWNER_ID)
|
||||
.param("name", "Betty")
|
||||
.param("type", "hamster")
|
||||
.param("birthDate", "2015/02/12")
|
||||
.param("birthDate", "2015-02-12")
|
||||
)
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(view().name("redirect:/owners/{ownerId}"));
|
||||
|
@ -85,7 +85,7 @@ public class PetControllerTests {
|
|||
public void testProcessCreationFormHasErrors() throws Exception {
|
||||
mockMvc.perform(post("/owners/{ownerId}/pets/{petId}/edit", TEST_OWNER_ID, TEST_PET_ID)
|
||||
.param("name", "Betty")
|
||||
.param("birthDate", "2015/02/12")
|
||||
.param("birthDate", "2015-02-12")
|
||||
)
|
||||
.andExpect(model().attributeHasNoErrors("owner"))
|
||||
.andExpect(model().attributeHasErrors("pet"))
|
||||
|
@ -106,7 +106,7 @@ public class PetControllerTests {
|
|||
mockMvc.perform(post("/owners/{ownerId}/pets/{petId}/edit", TEST_OWNER_ID, TEST_PET_ID)
|
||||
.param("name", "Betty")
|
||||
.param("type", "hamster")
|
||||
.param("birthDate", "2015/02/12")
|
||||
.param("birthDate", "2015-02-12")
|
||||
)
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(view().name("redirect:/owners/{ownerId}"));
|
||||
|
|
Loading…
Reference in a new issue