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

test checking if user can access public overlay

parent 2cfcb443
......@@ -887,4 +887,24 @@ public class OverlayControllerIntegrationTest extends ControllerIntegrationTest
assertEquals("First user data overlay should be ordered with 1", 1, orderNumber);
}
@Test
public void testUserCanAccessPublicOverlay() throws Exception {
createUser(TEST_USER_LOGIN, TEST_USER_PASSWORD, project);
Layout overlay = new Layout();
overlay.setProject(project);
overlay.setPublicLayout(true);
layoutDao.add(overlay);
MockHttpSession session = createSession(TEST_USER_LOGIN, TEST_USER_PASSWORD);
RequestBuilder request = get("/projects/" + TEST_PROJECT + "/overlays/" + overlay.getId() + "/")
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.session(session);
mockMvc.perform(request)
.andExpect(status().is2xxSuccessful());
}
}
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