REPO-3626: added a new parameter notExtractBookmarksText

This commit is contained in:
Andreea Nechifor
2018-07-24 10:59:03 +03:00
parent 3493b4c7d2
commit 4d2d4acce7
4 changed files with 44 additions and 7 deletions

View File

@@ -341,4 +341,14 @@ public class TikaControllerTest extends AbstractTransformerControllerTest
{
transform(TEXT_MINING, DOC, TXT, MIMETYPE_WORD, MIMETYPE_TEXT_PLAIN, null, EXPECTED_TEXT_CONTENT_CONTAINS);
}
@Test
public void pdfToTxtExtractBookmarksTest() throws Exception
{
super.mockTransformCommand(controller, PDF, TXT, MIMETYPE_PDF, true);
mockMvc.perform(mockMvcRequest("/transform", sourceFile, "targetExtension", targetExtension).param("notExtractBookmarksText", "true"))
.andExpect(status().is(200))
.andExpect(header().string("Content-Disposition", "attachment; filename*= UTF-8''quick." + targetExtension));
}
}