mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fix to thumbnail test which would fail if the PDF2SWF tool was not present
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9361 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -101,17 +101,21 @@ public class ThumbnailServiceTest extends BaseWebScriptTest
|
|||||||
|
|
||||||
public void testCreateThumbnail() throws Exception
|
public void testCreateThumbnail() throws Exception
|
||||||
{
|
{
|
||||||
String url = "/api/node/" + pdfNode.getStoreRef().getProtocol() + "/" + pdfNode.getStoreRef().getIdentifier() + "/" + pdfNode.getId() + "/content/thumbnails";
|
// Check for pdfToSWF transformation before doing test
|
||||||
System.out.println(url);
|
if (this.contentService.getTransformer(MimetypeMap.MIMETYPE_PDF, MimetypeMap.MIMETYPE_FLASH) != null)
|
||||||
|
{
|
||||||
JSONObject tn = new JSONObject();
|
String url = "/api/node/" + pdfNode.getStoreRef().getProtocol() + "/" + pdfNode.getStoreRef().getIdentifier() + "/" + pdfNode.getId() + "/content/thumbnails";
|
||||||
tn.put("thumbnailName", "webpreview");
|
System.out.println(url);
|
||||||
System.out.println(tn.toString());
|
|
||||||
|
JSONObject tn = new JSONObject();
|
||||||
MockHttpServletResponse response = this.postRequest(url, 200, tn.toString(), "application/json");
|
tn.put("thumbnailName", "webpreview");
|
||||||
//JSONObject result = new JSONObject(response.getContentAsString());
|
System.out.println(tn.toString());
|
||||||
|
|
||||||
System.out.println(response.getContentAsString());
|
MockHttpServletResponse response = this.postRequest(url, 200, tn.toString(), "application/json");
|
||||||
|
//JSONObject result = new JSONObject(response.getContentAsString());
|
||||||
|
|
||||||
|
System.out.println(response.getContentAsString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user