Commit 2d78e827 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

test checking if order is kept for public overlays

parent a3e03a75
......@@ -1234,5 +1234,32 @@ public class OverlayControllerIntegrationTest extends ControllerIntegrationTest
assertEquals(2, overlay3.getOrderIndex());
}
@Test
public void testOrderAfterRemoveOverlayForPublicOverlay() throws Exception {
createAdmin(TEST_ADMIN_LOGIN, TEST_ADMIN_PASSWORD);
Layout overlay1 = createOverlay(null);
overlay1.setOrderIndex(1);
Layout overlay2 = createOverlay(null);
overlay2.setOrderIndex(2);
Layout overlay3 = createOverlay(null);
overlay3.setOrderIndex(3);
layoutDao.update(overlay1);
layoutDao.update(overlay2);
layoutDao.update(overlay3);
MockHttpSession session = createSession(TEST_ADMIN_LOGIN, TEST_ADMIN_PASSWORD);
RequestBuilder request = delete("/projects/" + TEST_PROJECT + "/overlays/" + overlay2.getId())
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.session(session);
mockMvc.perform(request)
.andExpect(status().is2xxSuccessful());
assertEquals(1, overlay1.getOrderIndex());
assertEquals(2, overlay3.getOrderIndex());
}
}
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