Last active
April 16, 2020 20:53
-
-
Save mosdevly/6a90cc2daa532dcf2d7413d1ed2146c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
void createDriver() throws Exception { | |
String driverJson = "{\"nickname\": \"Speed Racer\", \"firstName\": \"Tester\", \"lastName\": \"McTesty\", \"birthday\": \"1990-04-18\"}"; | |
MockHttpServletRequestBuilder request = post("/api/drivers/new") | |
.contentType(MediaType.APPLICATION_JSON) | |
.content(driverJson); | |
mvc.perform(request) | |
.andExpect(status().isOk()) | |
.andExpect(jsonPath("$.id").exists()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment