TestCacheController.kt 742 B

1234567891011121314151617181920212223
  1. package com.gxzc.zen.cache
  2. import com.gxzc.zen.base.BaseTestKt
  3. import com.gxzc.zen.orm.annotation.Test
  4. import org.springframework.http.MediaType
  5. import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get
  6. import org.springframework.test.web.servlet.result.MockMvcResultMatchers.content
  7. import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status
  8. /**
  9. *
  10. * @author NorthLan at 2018/2/5
  11. */
  12. class TestCacheController : BaseTestKt() {
  13. @Test
  14. fun loadUser() {
  15. mockMvc.perform(get("/")
  16. .accept(MediaType.parseMediaType("application/json;charset=UTF-8")))
  17. .andExpect(status().isOk)
  18. .andExpect(content().contentType("application/json"))
  19. }
  20. }