@Test public void findByIdShouldReturn404WhenOrderDoesntExistLoggedAsClient() { nonExistingId = 999L; given() .header("Content-type", "application/json") .header("Authorization", "Bearer " + clientToken) .accept(ContentType.JSON) .when() .get("/orders/{id}", nonExistingId) .then() .statusCode(404); }
Atualizado há 7 meses