@Test public void findByIdShouldReturnNotFoundWhenOrderDontExistAndLoggedAsClient() throws Exception { ResultActions result = mockMvc.perform(get("/orders/{id}", nonExistingId) .header("Authorization", "Bearer " + clientToken) .accept(MediaType.APPLICATION_JSON)); result.andExpect(status().isNotFound()); }
Atualizado há 7 meses