Skip to content

Instantly share code, notes, and snippets.

@labra
Created February 11, 2016 09:59
Show Gist options
  • Save labra/1f45c1a72d2de1c0e405 to your computer and use it in GitHub Desktop.
Save labra/1f45c1a72d2de1c0e405 to your computer and use it in GitHub Desktop.
@Test
public void postUserKnown() throws Exception {
mvc
.perform(post("/user")
.contentType(MediaType.APPLICATION_JSON)
.content("{\"email\":\"[email protected]\", \"password\": \"jj\"}")
).andExpect(status().isOk())
.andExpect(jsonPath("name", equalTo("jose")))
.andExpect(jsonPath("pollingStationCode").value(23));
}
@davidglezz
Copy link

No he podido usar este fragmento porque la variable mvc y el método post no los tengo y no sido capaz de inferirlos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment