From e070b4033bda6667c6545a5ac97bb3b261e7eace Mon Sep 17 00:00:00 2001 From: Alexander Constantin Date: Sun, 7 Mar 2021 12:22:48 +0100 Subject: [PATCH] fix HttpControllersTests content type assertion fix the assertion in the readme to be the same as in the example code --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 2806eb1..90dd0f0 100644 --- a/README.adoc +++ b/README.adoc @@ -856,7 +856,7 @@ class HttpControllersTests(@Autowired val mockMvc: MockMvc) { every { articleRepository.findAllByOrderByAddedAtDesc() } returns listOf(spring5Article, spring43Article) mockMvc.perform(get("/api/article/").accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)) .andExpect(jsonPath("\$.[0].author.login").value(juergen.login)) .andExpect(jsonPath("\$.[0].slug").value(spring5Article.slug)) .andExpect(jsonPath("\$.[1].author.login").value(juergen.login)) @@ -870,7 +870,7 @@ class HttpControllersTests(@Autowired val mockMvc: MockMvc) { every { userRepository.findAll() } returns listOf(juergen, smaldini) mockMvc.perform(get("/api/user/").accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)) .andExpect(jsonPath("\$.[0].login").value(juergen.login)) .andExpect(jsonPath("\$.[1].login").value(smaldini.login)) }