TAS-1052 - add test "Valid request returns success status code 201 with manager user"

This commit is contained in:
cagache
2016-10-03 15:16:02 +03:00
parent a6537f0bf4
commit 6a970a2902
@@ -44,12 +44,19 @@ public class AddTagSanityTests extends RestTest
tagsAPI.useRestClient(restClient);
}
@TestRail(section = { "rest-api",
"comments" }, executionType = ExecutionType.SANITY, description = "Verify admin user adds tags with Rest API and status code is 201")
"tags" }, executionType = ExecutionType.SANITY, description = "Verify admin user adds tags with Rest API and status code is 201")
public void adminIsAbleToAddTag() throws JsonToModelConversionException, Exception
{
tagsAPI.addTag(document, "tag" + adminUserModel.getUsername());
tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED);
}
@TestRail(section = { "rest-api",
"tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds tags with Rest API and status code is 201")
public void managerIsAbleToAddTag() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
tagsAPI.addTag(document, "tag" + UserRole.SiteManager);
tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED);
}
}