Commit f69c31f07777dd006a40fca07d1df83de44df36a

Authored by Volodymyr Babak
1 parent 4e45d24f

Test fixed

... ... @@ -200,7 +200,7 @@ public abstract class AbstractControllerTest {
200 200 User savedUser = doPost("/api/user", user, User.class);
201 201 logout();
202 202 doGet("/api/noauth/activate?activateToken={activateToken}", TestMailService.currentActivateToken)
203   - .andExpect(status().isPermanentRedirect())
  203 + .andExpect(status().isSeeOther())
204 204 .andExpect(header().string(HttpHeaders.LOCATION, "/login/createPassword?activateToken=" + TestMailService.currentActivateToken));
205 205 JsonNode tokenInfo = readResponse(doPost("/api/noauth/activate", "activateToken", TestMailService.currentActivateToken, "password", password).andExpect(status().isOk()), JsonNode.class);
206 206 validateAndSetJwtToken(tokenInfo, user.getEmail());
... ...
... ... @@ -70,7 +70,7 @@ public class UserControllerTest extends AbstractControllerTest {
70 70
71 71 logout();
72 72 doGet("/api/noauth/activate?activateToken={activateToken}", TestMailService.currentActivateToken)
73   - .andExpect(status().isPermanentRedirect())
  73 + .andExpect(status().isSeeOther())
74 74 .andExpect(header().string(HttpHeaders.LOCATION, "/login/createPassword?activateToken=" + TestMailService.currentActivateToken));
75 75
76 76 JsonNode tokenInfo = readResponse(doPost("/api/noauth/activate", "activateToken", TestMailService.currentActivateToken, "password", "testPassword").andExpect(status().isOk()), JsonNode.class);
... ... @@ -120,7 +120,7 @@ public class UserControllerTest extends AbstractControllerTest {
120 120 doPost("/api/noauth/resetPasswordByEmail", "email", email)
121 121 .andExpect(status().isOk());
122 122 doGet("/api/noauth/resetPassword?resetToken={resetToken}", TestMailService.currentResetPasswordToken)
123   - .andExpect(status().isPermanentRedirect())
  123 + .andExpect(status().isSeeOther())
124 124 .andExpect(header().string(HttpHeaders.LOCATION, "/login/resetPassword?resetToken=" + TestMailService.currentResetPasswordToken));
125 125
126 126 JsonNode tokenInfo = readResponse(doPost("/api/noauth/resetPassword", "resetToken", TestMailService.currentResetPasswordToken, "password", "testPassword2").andExpect(status().isOk()), JsonNode.class);
... ...