TAS-902 postComment with Consumer

This commit is contained in:
Cristina Jalba
2016-09-28 09:29:42 +03:00
parent 129a80cfa5
commit 753f3989f5

View File

@@ -77,5 +77,14 @@ public class PostCommentsTest extends RestTest
commentsAPI.addComment(document.getNodeRef(), "This is a new comment added by user with role: " + UserRole.SiteCollaborator);
commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED.toString());
}
@TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY,
description= "Verify Consumer user adds comments with Rest API and status code is 201")
public void consumerIsAbleToAddComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.get(UserRole.SiteConsumer));
commentsAPI.addComment(document.getNodeRef(), "This is a new comment added by user with role: " + UserRole.SiteConsumer);
commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN.toString());
}
}