Skip to content

Commit

Permalink
Added: DataverseFeaturedItemsIT assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
GPortas committed Jan 1, 2025
1 parent d50a943 commit 220e02a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.junit.jupiter.api.Test;

import static jakarta.ws.rs.core.Response.Status.*;
import static org.hamcrest.CoreMatchers.equalTo;

public class DataverseFeaturedItemsIT {

Expand Down Expand Up @@ -43,5 +44,10 @@ public void testDeleteFeaturedItem() {
// Should delete featured item when passing correct id and user have permissions
deleteFeatureItemResponse = UtilIT.deleteDataverseFeaturedItem(featuredItemId, apiToken);
deleteFeatureItemResponse.then().assertThat().statusCode(OK.getStatusCode());

Response listFeaturedItemsResponse = UtilIT.listDataverseFeaturedItems(dataverseAlias, apiToken);
listFeaturedItemsResponse.then()
.body("data.size()", equalTo(0))
.assertThat().statusCode(OK.getStatusCode());
}
}

0 comments on commit 220e02a

Please sign in to comment.