1

Merge pull request #150 from hhu-propra2/ControllerServiceTests

Controller service tests
This commit is contained in:
tomvahl
2020-03-27 15:15:36 +01:00
committed by GitHub
3 changed files with 245 additions and 26 deletions

View File

@ -47,8 +47,7 @@ class SecurityConfig extends KeycloakWebSecurityConfigurerAdapter {
}
@Bean
@Scope(scopeName = WebApplicationContext.SCOPE_REQUEST,
proxyMode = ScopedProxyMode.TARGET_CLASS)
@Scope(scopeName = WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.TARGET_CLASS)
public AccessToken getAccessToken() {
HttpServletRequest request =
((ServletRequestAttributes) RequestContextHolder

View File

@ -133,6 +133,7 @@ public class ControllerService {
}
private List<User> readCsvFile(MultipartFile file) throws EventException, IOException {
if(file == null) return new ArrayList<>();
if (!file.isEmpty()) {
try {
List<User> userList = CsvService.read(file.getInputStream());