From c5009e8a07114dafca17517e27298911781137e7 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 21 Oct 2022 17:44:59 -0700 Subject: [PATCH] Add automation for starred. --- .../com/wisemapping/test/rest/RestMindmapITCase.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestMindmapITCase.java b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestMindmapITCase.java index 72334816..69237dee 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/rest/RestMindmapITCase.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/rest/RestMindmapITCase.java @@ -26,6 +26,7 @@ import java.util.stream.Stream; import org.springframework.web.client.RestClientException; +import static com.wisemapping.test.rest.RestHelper.createHeaders; import static org.testng.Assert.*; @Test @@ -223,11 +224,11 @@ public class RestMindmapITCase { template.put(resourceUrl, updateEntity); // Has been updated ?. - final String mapId = mapUri.getPath().replace("/service/maps/", ""); - Optional mindmapInfo = fetchMap(requestHeaders, template, mapId); - // @todo: Enforce check... - assertTrue(mindmapInfo.get().getStarred() == true); + final HttpEntity findLabelEntity = new HttpEntity(createHeaders(MediaType.TEXT_PLAIN)); + final ResponseEntity response = template.exchange(resourceUrl, HttpMethod.GET, findLabelEntity, String.class); + + assertTrue(Boolean.parseBoolean(response.getBody()), "Starred has been updated"); } @Test(dataProviderClass = RestHelper.class, dataProvider = "ContentType-Provider-Function")