mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-10-01 14:41:19 +00:00
TAS-1070 - add scenario for delete tag by unauthorized user
This commit is contained in:
@@ -97,4 +97,14 @@ public class RemoveTagSanityTests extends RestTest
|
||||
tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN);
|
||||
}
|
||||
|
||||
@TestRail(section = { "rest-api",
|
||||
"tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails")
|
||||
public void managerIsNotAbleToDeleteTagIfAuthenticationFails() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
UserModel siteManager = usersWithRoles.getOneUserWithRole(UserRole.SiteManager);
|
||||
siteManager.setPassword("wrongPassword");
|
||||
restClient.authenticateUser(siteManager);
|
||||
tagsAPI.deleteTag(document, tag);
|
||||
tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user