This commit is contained in:
Cristina Jalba
2016-10-04 14:13:21 +03:00
parent f682b0605a
commit 94c0ade52e

View File

@@ -59,4 +59,15 @@ public class RestGetNetworkForPersonSanityTests extends RestTest
networkApi.getNetworkForUser(adminTenantUser); networkApi.getNetworkForUser(adminTenantUser);
networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK);
} }
@Test(groups = "sanity")
@TestRail(section = { "rest-api",
"networks" }, executionType = ExecutionType.SANITY, description = "Verify tenant user is not authorized to check network of another user with Rest API and checks the forbidden status")
public void tenantUserIsNotAuthorizedToCheckNetworkOfAnotherUser() throws Exception
{
restClient.authenticateUser(tenantUser);
networkApi.getNetworkForUser(adminTenantUser);
networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.UNAUTHORIZED);
}
} }