TAS-1074 REST API - add like valid request returns success status code 201 with Consumer role

This commit is contained in:
Valentin Popa
2016-10-03 18:18:21 +03:00
parent b588c84e86
commit ffb374cc2e
@@ -87,4 +87,16 @@ public class AddRateSanityTests extends RestTest
ratingsApi.usingRestWrapper()
.assertStatusCodeIs(HttpStatus.CREATED);
}
@TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY,
description = "Verify user with Consumer role is able to post like rating to a document")
public void consumerIsAbleToLikeDocument() throws Exception
{
rating = new LikeRatingBody(ratingTypes.likes.toString(), true);
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer));
ratingsApi.addRate(document, rating);
ratingsApi.usingRestWrapper()
.assertStatusCodeIs(HttpStatus.CREATED);
}
}