added authentication step for admin tests

This commit is contained in:
cnechifor
2016-10-18 00:34:39 +03:00
parent 89d1151c7f
commit c4e3c6f684
6 changed files with 6 additions and 0 deletions
@@ -48,6 +48,7 @@ public class AddCommentSanityTests extends RestTest
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify admin user adds comments with Rest API and status code is 201")
public void adminIsAbleToAddComment() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
commentsAPI.addComment(document, "This is a new comment added by " + adminUserModel.getUsername());
commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED);
}