TAS-1054 - add test "request returns status code 403 with contributor user"

This commit is contained in:
cagache
2016-10-03 15:20:01 +03:00
parent d0f209bb3c
commit 7e62b061eb
@@ -68,4 +68,13 @@ public class AddTagSanityTests extends RestTest
tagsAPI.addTag(document, "tag" + UserRole.SiteCollaborator);
tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED);
}
@TestRail(section = { "rest-api",
"tags" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user doesn't have permission to add tags with Rest API and status code is 403")
public void contributorIsNotAbleToAddTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor));
tagsAPI.addTag(document, "tag" + UserRole.SiteContributor);
tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN);
}
}