Fixed old tests
This commit is contained in:
@ -37,16 +37,6 @@ public class ConfigControllerTest {
|
||||
@Autowired
|
||||
private UserService service;
|
||||
|
||||
@Test
|
||||
public void shouldReturnOK() throws Exception {
|
||||
final InputStream inputStream = getClass().getClassLoader().getResourceAsStream(FILE_NAME);
|
||||
final MockMultipartFile file = new MockMultipartFile("file", inputStream);
|
||||
|
||||
MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build();
|
||||
mockMvc.perform(multipart(CONFIG_ENDPOINT).file(file)).andExpect(status().isOk());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldReturnNoAuthorized() throws Exception {
|
||||
final InputStream inputStream = getClass().getClassLoader().getResourceAsStream(FILE_NAME);
|
||||
@ -59,7 +49,7 @@ public class ConfigControllerTest {
|
||||
|
||||
@Test
|
||||
public void shouldReturnOKAuthorized() throws Exception {
|
||||
final User usr = new User(null, null, TEST_MAIL, UserRoles.TEST_USER);
|
||||
final User usr = new User(null, null, TEST_MAIL, UserRoles.ADMIN);
|
||||
this.service.save(usr);
|
||||
|
||||
final InputStream inputStream = getClass().getClassLoader().getResourceAsStream(FILE_NAME);
|
||||
|
Reference in New Issue
Block a user