use of retrofit2.Response in project sonarqube by SonarSource.
the class HttpHeadersTest method verify_headers_of_images.
@Test
public void verify_headers_of_images() throws Exception {
Response response = call(orchestrator.getServer().getUrl() + "/images/logo.svg");
verifySecurityHeaders(response);
verifyContentType(response, "image/svg+xml");
assertCacheInBrowser(response);
}
use of retrofit2.Response in project sonarqube by SonarSource.
the class HttpHeadersTest method verify_headers_of_ws.
@Test
public void verify_headers_of_ws() throws Exception {
Response response = call(orchestrator.getServer().getUrl() + "/api/issues/search");
verifySecurityHeaders(response);
verifyContentType(response, "application/json");
assertNoCacheInBrowser(response);
}
use of retrofit2.Response in project sonarqube by SonarSource.
the class HttpHeadersTest method verify_headers_of_css.
@Test
public void verify_headers_of_css() throws Exception {
Response response = call(orchestrator.getServer().getUrl() + "/css/sonar." + JS_HASH + ".css");
verifySecurityHeaders(response);
verifyContentType(response, "text/css");
assertCacheInBrowser(response);
}
use of retrofit2.Response in project sonarqube by SonarSource.
the class CeHttpServerTest method return_http_response_with_code_404_and_exception_message_as_body_when_url_has_no_matching_action.
@Test
public void return_http_response_with_code_404_and_exception_message_as_body_when_url_has_no_matching_action() throws IOException {
String action = "/dfdsfdsfsdsd";
Response response = call(underTest.getUrl() + action);
assertThat(response.code()).isEqualTo(404);
assertThat(response.body().string()).isEqualTo("Error 404, '" + action + "' not found.");
}
use of retrofit2.Response in project sonarqube by SonarSource.
the class CeHttpServerTest method action_is_matched_on_URL_ignoring_case.
@Test
public void action_is_matched_on_URL_ignoring_case() throws IOException {
Response response = call(underTest.getUrl() + "/pOMpoM");
assertIsPomPomResponse(response);
}
Aggregations