mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-2203 (Show selected classification reason id's rather than description)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105215 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
<#list reasons as reason>
|
<#list reasons as reason>
|
||||||
{
|
{
|
||||||
"id": "${reason.id?json_string}",
|
"id": "${reason.id?json_string}",
|
||||||
"displayLabel": "${reason.displayLabel?json_string}"
|
"displayLabel": "${reason.displayLabel?json_string}",
|
||||||
|
"fullReason": "${reason.id?json_string}: ${reason.displayLabel?json_string}"
|
||||||
}<#if reason_has_next>,</#if>
|
}<#if reason_has_next>,</#if>
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
|
@@ -95,7 +95,7 @@ public class ReasonsGetUnitTest extends BaseWebScriptUnitTest
|
|||||||
|
|
||||||
// check the JSON result using Jackson to allow easy equality testing.
|
// check the JSON result using Jackson to allow easy equality testing.
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
String expectedJSONString = "{\"data\":{\"items\":[{\"displayLabel\":\"labelA\",\"id\":\"idA\"},{\"displayLabel\":\"labelB\",\"id\":\"idB\"}]}}";
|
String expectedJSONString = "{\"data\":{\"items\":[{\"displayLabel\":\"labelA\",\"id\":\"idA\",\"fullReason\":\"idA: labelA\"},{\"displayLabel\":\"labelB\",\"id\":\"idB\",\"fullReason\":\"idB: labelB\"}]}}";
|
||||||
JsonNode expected = mapper.readTree(expectedJSONString);
|
JsonNode expected = mapper.readTree(expectedJSONString);
|
||||||
assertEquals(expected, mapper.readTree(actualJSONString));
|
assertEquals(expected, mapper.readTree(actualJSONString));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user