TAS-1252 REST API - admin user is not able to update a site membership request

This commit is contained in:
Valentin Popa
2016-10-07 15:29:41 +03:00
parent 5dcbf5e00d
commit 04340be536
@@ -160,4 +160,21 @@ public class UpdateSiteMembershipRequestSanityTests extends RestTest
peopleApi.usingRestWrapper()
.assertStatusCodeIs(HttpStatus.FORBIDDEN);
}
@TestRail(section = { "rest-api", "people" },
executionType = ExecutionType.SANITY, description = "Verify admin is not able to update membership request of another user")
@Bug(id = "MNT-16919")
public void adminIsNotAbleToUpdateSiteMembershipRequestOfAnotherUser() throws JsonToModelConversionException, Exception
{
UserModel newMember = dataUser.createRandomTestUser();
restClient.authenticateUser(newMember);
peopleApi.addSiteMembershipRequest(newMember, initialSiteMembership);
restClient.authenticateUser(adminUser);
peopleApi.updateSiteMembershipRequest(newMember, updatedSiteMembership);
peopleApi.usingRestWrapper()
.assertStatusCodeIs(HttpStatus.FORBIDDEN);
}
}