Use AssertJ in spring-boot-samples
See gh-5083
This commit is contained in:
@@ -31,7 +31,7 @@ import org.springframework.test.web.servlet.MvcResult;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
@@ -83,8 +83,8 @@ public class SampleHypermediaJpaApplicationIntegrationTests {
|
||||
public void browser() throws Exception {
|
||||
MvcResult response = this.mockMvc.perform(get("/").accept(MediaType.TEXT_HTML))
|
||||
.andExpect(status().isFound()).andReturn();
|
||||
assertEquals("/browser/index.html#",
|
||||
response.getResponse().getHeaders("location").get(0));
|
||||
assertThat(response.getResponse().getHeaders("location").get(0))
|
||||
.isEqualTo("/browser/index.html#");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user