Commit d806584b authored by Piotr Gawron's avatar Piotr Gawron
Browse files

documentation for list of connections between map API call

parent 449a72ce
......@@ -33,3 +33,18 @@ include::{snippets}/projects/project_maps/get_by_id/curl-request.adoc[]
=== Sample Response
include::{snippets}/projects/project_maps/get_by_id/response-body.adoc[]
== Get connections between maps
Returns list of connections between (sub)maps in a project.
=== Path Parameters
include::{snippets}/projects/project_maps/get_connections/path-parameters.adoc[]
=== Response Fields
include::{snippets}/projects/project_maps/get_connections/response-fields.adoc[]
=== CURL sample
include::{snippets}/projects/project_maps/get_connections/curl-request.adoc[]
=== Sample Response
include::{snippets}/projects/project_maps/get_connections/response-body.adoc[]
......@@ -450,13 +450,25 @@ public class ProjectControllerIntegrationTest extends ControllerIntegrationTest
public void testGetSubmapConnectionsForUndefinedProjectId() throws Exception {
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = get("/projects/*/submapConnections/")
.session(session);
RequestBuilder request = get("/projects/*/submapConnections/").session(session);
mockMvc.perform(request)
.andExpect(status().isNotFound());
}
@Test
public void testGetSubmapConnectionsForProject() throws Exception {
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = get("/projects/{projectId}/submapConnections/", BUILT_IN_PROJECT).session(session);
mockMvc.perform(request)
.andExpect(status().is2xxSuccessful())
.andDo(document("projects/project_maps/get_by_id",
pathParameters(parameterWithName("projectId").description("project identifier")),
responseFields(fieldWithPath("[]").description("list of connections").type("Array"))));
}
@Test(timeout = 10000)
public void addProjectWithInvalidFileId() throws Exception {
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment