use of org.alfresco.rest.api.tests.client.Pair in project alfresco-remote-api by Alfresco.
the class TestPeople method testUpdatePersonWithNotUpdatableFields.
@Test
public void testUpdatePersonWithNotUpdatableFields() throws PublicApiException {
final String personId = account3.createUser().getId();
publicApiClient.setRequestContext(new RequestContext(account3.getId(), account3Admin, "admin"));
List<Pair<String, String>> notUpdatableFields = new ArrayList<>();
notUpdatableFields.add(new Pair("userName", "userName"));
notUpdatableFields.add(new Pair("avatarId", "avatarId"));
notUpdatableFields.add(new Pair("statusUpdatedAt", "statusUpdatedAt"));
notUpdatableFields.add(new Pair("quota", "quota"));
notUpdatableFields.add(new Pair("quotaUsed", "quotaUsed"));
for (Pair<String, String> notUpdatableField : notUpdatableFields) {
people.update("people", personId, null, null, "{\n" + "\"" + notUpdatableField.getFirst() + "\": \"" + notUpdatableField.getSecond() + "\"\n" + "}", null, "Expected 400 response when updating " + personId, 400);
}
}
Aggregations