fix tests

This commit is contained in:
anhefti 2019-09-02 14:47:01 +02:00
parent a5a2551151
commit 870eaffe8c
2 changed files with 17 additions and 3 deletions

View file

@ -104,13 +104,13 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version> <version>2.19.1</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId> <artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version> <version>2.19.1</version>
</plugin> </plugin>
<plugin> <plugin>

View file

@ -20,6 +20,9 @@ import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.model.Domain; import ch.ethz.seb.sebserver.gbl.model.Domain;
import ch.ethz.seb.sebserver.gbl.model.EntityProcessingReport; import ch.ethz.seb.sebserver.gbl.model.EntityProcessingReport;
import ch.ethz.seb.sebserver.gbl.model.institution.Institution; import ch.ethz.seb.sebserver.gbl.model.institution.Institution;
import ch.ethz.seb.sebserver.gbl.model.user.PasswordChange;
import ch.ethz.seb.sebserver.gbl.model.user.UserInfo;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.util.Result; import ch.ethz.seb.sebserver.gbl.util.Result;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestServiceImpl; import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestServiceImpl;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.institution.ActivateInstitution; import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.institution.ActivateInstitution;
@ -108,7 +111,18 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
assertNotNull(instId); assertNotNull(instId);
//restService.getBuilder(NewUserAccount.class) final UserInfo userInfo = restService.getBuilder(NewUserAccount.class)
.withFormParam(Domain.USER.ATTR_INSTITUTION_ID, instId)
.withFormParam(Domain.USER.ATTR_NAME, "TestInstAdmin")
.withFormParam(Domain.USER.ATTR_USERNAME, "TestInstAdmin")
.withFormParam(Domain.USER.ATTR_EMAIL, "test@test.ch")
.withFormParam(Domain.USER_ROLE.REFERENCE_NAME, UserRole.INSTITUTIONAL_ADMIN.name())
.withFormParam(PasswordChange.ATTR_NAME_NEW_PASSWORD, "12345678")
.withFormParam(PasswordChange.ATTR_NAME_CONFIRM_NEW_PASSWORD, "12345678")
.call()
.getOrThrow();
assertNotNull(userInfo);
} }