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