Search in sources :

Example 1 with MockResponse

use of edu.harvard.iq.dataverse.util.MockResponse in project dataverse by IQSS.

the class AbstractApiBeanTest method testAllowCors.

@Test
public void testAllowCors() {
    Response r = sut.allowCors(new MockResponse(200));
    assertEquals("*", r.getHeaderString("Access-Control-Allow-Origin"));
}
Also used : MockResponse(edu.harvard.iq.dataverse.util.MockResponse) Response(javax.ws.rs.core.Response) MockResponse(edu.harvard.iq.dataverse.util.MockResponse) Test(org.junit.Test)

Aggregations

MockResponse (edu.harvard.iq.dataverse.util.MockResponse)1 Response (javax.ws.rs.core.Response)1 Test (org.junit.Test)1