Lt. Templeton Peck
08/28/2019, 2:37 PM@Test
fun `multiple params comma-separated returns 4 entries`() {
mockMvc.perform(
MockMvcRequestBuilders.get("/v1")
.param("ids1", "A,B")
.param("ids2", "C,D")
.contentType(MediaType.APPLICATION_JSON)
)
.andExpect(status().isOk)
.andExpect(jsonPath("$.length()", equalTo(4)))
.andExpect(jsonPath("$[0]", equalTo("A")))
.andExpect(jsonPath("$[1]", equalTo("B")))
.andExpect(jsonPath("$[2]", equalTo("C")))
.andExpect(jsonPath("$[3]", equalTo("D")))
}