Fixed reject/approve

master
Luca Frosini 2 years ago
parent 7f3ea5da14
commit e2c0cbbee4

@ -155,6 +155,7 @@ public class Item extends GCatClient implements org.gcube.gcat.api.interfaces.It
initRequest();
gxhttpStringRequest.path(name);
String moderationContentString = (new ObjectMapper()).writeValueAsString(moderationContent);
gxhttpStringRequest.header("Content-Type", GCatConstants.APPLICATION_JSON_CHARSET_UTF_8);
gxhttpStringRequest.withBody(moderationContentString);
HttpURLConnection httpURLConnection = gxhttpStringRequest.post();
return parseHttpURLConnection(httpURLConnection);

@ -269,4 +269,12 @@ public class ItemTest extends ContextTest {
item.bulkDelete(queryParams, false);
}
@Test
public void testModeration() throws Exception {
ContextTest.setContextByName("/pred4s/preprod/Dorne");
Item item = new Item();
item.reject("my_first_restful_transaction_model_private", "Questo item non mi piace");
}
}

Loading…
Cancel
Save