Fixed old tests

This commit is contained in:
Filip Izydorczyk
2020-10-24 16:43:42 +02:00
parent 4b07793849
commit c003198aa1
2 changed files with 3 additions and 18 deletions

View File

@ -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);