REPO-2110 / MNT-17477: Trivial - fix test

- re-fix mismatch (4.2 vs 5.x) in test helper only

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@135686 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2017-03-07 16:34:27 +00:00
parent 8b8215fd83
commit 134cdcb66e

View File

@@ -2381,20 +2381,20 @@ public class TestCMIS extends EnterpriseTestApi
// note: Content-Disposition can be "inline or "attachment" for content types that are white-listed (eg. specific image types & pdf) // note: Content-Disposition can be "inline or "attachment" for content types that are white-listed (eg. specific image types & pdf)
HttpResponse response = publicApiClient.get("/"+network1.getId()+"/public/cmis/versions/1.1/browser/root/Shared/"+name, null); HttpResponse response = publicApiClient.get(network1.getId()+"/public/cmis/versions/1.1/browser/root/Shared/"+name, null);
assertEquals(200, response.getStatusCode()); assertEquals(200, response.getStatusCode());
assertTrue(response.getHeaders().get("Content-Disposition").startsWith("inline")); assertTrue(response.getHeaders().get("Content-Disposition").startsWith("inline"));
response = publicApiClient.get("/"+network1.getId()+"/public/cmis/versions/1.1/browser/root/Shared/"+name+"?download=inline", null); response = publicApiClient.get(network1.getId()+"/public/cmis/versions/1.1/browser/root/Shared/"+name+"?download=inline", null);
assertEquals(200, response.getStatusCode()); assertEquals(200, response.getStatusCode());
assertTrue(response.getHeaders().get("Content-Disposition").startsWith("inline")); assertTrue(response.getHeaders().get("Content-Disposition").startsWith("inline"));
response = publicApiClient.get("/"+network1.getId()+"/public/cmis/versions/1.1/browser/root/Shared/"+name+"?download=attachment", null); response = publicApiClient.get(network1.getId()+"/public/cmis/versions/1.1/browser/root/Shared/"+name+"?download=attachment", null);
assertEquals(200, response.getStatusCode()); assertEquals(200, response.getStatusCode());
assertTrue(response.getHeaders().get("Content-Disposition").startsWith("attachment")); assertTrue(response.getHeaders().get("Content-Disposition").startsWith("attachment"));
// note: AtomPub binding (via OpenCMIS) does not support "download" query parameter // note: AtomPub binding (via OpenCMIS) does not support "download" query parameter
response = publicApiClient.get("/"+network1.getId()+"/public/cmis/versions/1.1/atom/content?id="+docId, null); response = publicApiClient.get(network1.getId()+"/public/cmis/versions/1.1/atom/content?id="+docId, null);
assertEquals(200, response.getStatusCode()); assertEquals(200, response.getStatusCode());
assertTrue(response.getHeaders().get("Content-Disposition").startsWith("attachment")); assertTrue(response.getHeaders().get("Content-Disposition").startsWith("attachment"));
@@ -2423,16 +2423,16 @@ public class TestCMIS extends EnterpriseTestApi
// note: Content-Disposition will always be "attachment" for content types that are not white-listed // note: Content-Disposition will always be "attachment" for content types that are not white-listed
response = publicApiClient.get("/"+network1.getId()+"/public/cmis/versions/1.1/browser/root/Shared/"+name, null); response = publicApiClient.get(network1.getId()+"/public/cmis/versions/1.1/browser/root/Shared/"+name, null);
assertEquals(200, response.getStatusCode()); assertEquals(200, response.getStatusCode());
assertTrue(response.getHeaders().get("Content-Disposition").startsWith("attachment;")); assertTrue(response.getHeaders().get("Content-Disposition").startsWith("attachment;"));
response = publicApiClient.get("/"+network1.getId()+"/public/cmis/versions/1.1/browser/root/Shared/"+name+"?download=inline", null); response = publicApiClient.get(network1.getId()+"/public/cmis/versions/1.1/browser/root/Shared/"+name+"?download=inline", null);
assertEquals(200, response.getStatusCode()); assertEquals(200, response.getStatusCode());
assertTrue(response.getHeaders().get("Content-Disposition").startsWith("attachment;")); assertTrue(response.getHeaders().get("Content-Disposition").startsWith("attachment;"));
// note: AtomPub binding (via OpenCMIS) does not support "download" query parameter // note: AtomPub binding (via OpenCMIS) does not support "download" query parameter
response = publicApiClient.get("/"+network1.getId()+"/public/cmis/versions/1.1/atom/content?id="+docId, null); response = publicApiClient.get(network1.getId()+"/public/cmis/versions/1.1/atom/content?id="+docId, null);
assertEquals(200, response.getStatusCode()); assertEquals(200, response.getStatusCode());
assertTrue(response.getHeaders().get("Content-Disposition").startsWith("attachment;")); assertTrue(response.getHeaders().get("Content-Disposition").startsWith("attachment;"));
} }