Added download

This commit is contained in:
verboomp
2026-02-03 09:51:03 +01:00
parent f9ca668b39
commit 5f1d2d8610
25 changed files with 874 additions and 145 deletions

View File

@@ -197,4 +197,26 @@ public class CustomerResourceTest extends AbstractRestTest {
String expected = fileToString(BASE_DOWNLOAD + "doGetCustomer.json");
jsonAssert(expected, text);
}
@Test
@Order(1)
public void doDownload() throws IOException {
LOG.info("doDownload");
String authorization = getAuthorization();
LOG.info("authorization: " + authorization);
String path = deploymentURL + PATH + "/export/1";
Request request = Request.Get(path).addHeader("Accept", "application/pdf")
.addHeader("Authorization", authorization);
HttpResponse httpResponse = executeRequest(request);
int code = httpResponse.getStatusLine().getStatusCode();
assertEquals(200, code);
byte[] text = getResponse(httpResponse);
writeFile(text, "doDownload.pdf");
}
}