TAS-974 created test: getPerson call test with Consumer role

This commit is contained in:
Cristina Axinte
2016-09-29 12:43:27 +03:00
parent 2bce4ccc43
commit 5745ef3b60

View File

@@ -67,4 +67,16 @@ public class GetPeopleTest extends RestTest
peopleApi.getPerson(searchedUser.getUsername()); peopleApi.getPerson(searchedUser.getUsername());
peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK.toString()); peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK.toString());
} }
@Test(groups = "sanity")
@TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets a person with Rest API and response is successful")
public void consumerUserChecksIfPersonIsPresent() throws Exception
{
UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser();
dataUser.usingUser(userModel).addUserToSite(consumerUser, siteModel, UserRole.SiteConsumer);
restClient.authenticateUser(consumerUser);
peopleApi.getPerson(searchedUser.getUsername());
peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK.toString());
}
} }