Skip to content

Instantly share code, notes, and snippets.

@renato04
Created March 9, 2021 11:52
Show Gist options
  • Save renato04/222a428a8b5bbf565a20c566448d15c3 to your computer and use it in GitHub Desktop.
Save renato04/222a428a8b5bbf565a20c566448d15c3 to your computer and use it in GitHub Desktop.
@RunWith(SpringRunner.class)
@WebMvcTest(ExampleController.class)
public class ExampleControllerTest {
@Autowired
private MockMvc mockMvc;
@Test
public void should_get_metadata_when_video_processed() throws Exception {
this.mockMvc.perform(get("/test"))
.andDo(print())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.value", is(ExampleController.VALUE_BIG_DECIMAL)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment