1
0
mirror of synced 2026-08-05 01:36:56 +00:00

update to spring-io-plugin:0.0.6

- Update spring-io-plugin
- Update Spring Boot because spring-io-plugin now requires
  non passive dependency management plugin
This commit is contained in:
Rob Winch
2017-01-04 09:51:16 -06:00
parent 38492a5794
commit b5e0886bde
4 changed files with 39 additions and 51 deletions
@@ -15,16 +15,14 @@
*/
package org.springframework.security.samples;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@@ -34,22 +32,13 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Joe Grandja
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(InsecureApplication.class)
@WebAppConfiguration
@SpringBootTest
@AutoConfigureMockMvc
public class InsecureApplicationTests {
@Autowired
private WebApplicationContext context;
private MockMvc mockMvc;
@Before
public void setup() {
mockMvc = MockMvcBuilders
.webAppContextSetup(context)
.build();
}
@Test
public void accessUnprotected() throws Exception {
this.mockMvc.perform(get("/index")).andExpect(status().isOk());