test- added - deleteFavoriteIfPersonIdIsEmpty

This commit is contained in:
mionescu
2017-01-10 17:01:14 +02:00
parent 35ed0e04af
commit 43c8011d92
@@ -55,6 +55,18 @@ public class DeleteFavoriteCoreTests extends RestTest
.containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, "inexistent"));
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
description = "Verify that status code is 404 if PersonID is empty - favorite file.")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.CORE})
public void deleteFavoriteIfPersonIdIsEmpty() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(adminUserModel).addSiteToFavorites(siteModel);
restClient.withCoreAPI().usingAuthUser().addFileToFavorites(fileModel);
restClient.withCoreAPI().usingUser(new UserModel ("", ""))
.deleteFileFromFavorites(fileModel).assertStatusCodeIs(HttpStatus.BAD_REQUEST);
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
description = "Verify that status code is 404 if FavoriteID is incorrect - favorite file.")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.CORE})