Skip to content

Commit

Permalink
Necessário usuário válido para efetuar os testes. (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Dorow <alexander.dorow@senior.com.br>
  • Loading branch information
Alexanderdorow and Alexander Dorow authored May 28, 2020
1 parent b4d9ab2 commit d7aae4d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/java/br/com/senior/core/BaseIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
public abstract class BaseIT {

protected static LoginOutput login() throws ServiceException {
return login(System.getenv("SENIOR_USERNAME"), System.getenv("PASS"));
LoginOutput login = login(System.getenv("SENIOR_USERNAME"), System.getenv("PASS"));
if (login.getResetPasswordInfo() != null) {
throw new ServiceException(400, "Usuário informado inválido para os testes, é necessário fazer o login na plataforma ao menos uma vez após a sua criação para realizar a troca da senha.");
}
return login;
}

protected static LoginOutput login(String username, String password) throws ServiceException {
Expand Down

0 comments on commit d7aae4d

Please sign in to comment.