Small test fixc

This commit is contained in:
Filip Izydorczyk 2020-09-24 17:46:35 +02:00
parent 3d1269037b
commit 305b86945d
2 changed files with 5 additions and 10 deletions

View File

@ -12,7 +12,6 @@ import com.plannaplan.exceptions.UserNotFoundException;
import com.plannaplan.types.UserRoles;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
@ -41,7 +40,6 @@ public class UserServiceTest {
}
@Test
@Ignore
public void shouldReturnToken() {
try {
String token = this.userService.login(TEST_USER_MAIL);

View File

@ -10,7 +10,8 @@ public class CasValidatorTest {
@Test
@Ignore
public void shouldValidateTicket() {
//you need to privide fresh ticket to make this test pass that's why it is marked as ignored
// you need to privide fresh ticket to make this test pass that's why it is
// marked as ignored
CasValidator validator = new CasValidator("http://localhost:3000",
"ST-572267-cbgKrcJLd0tdCubeLqdW-cas.amu.edu.pl");
try {
@ -23,16 +24,12 @@ public class CasValidatorTest {
@Test
public void shouldNotValidateTicket() {
//you need to privide fresh ticket to make this test pass that's why it is marked as ignored
CasValidator validator = new CasValidator("http://localhost:3000",
"notticket");
CasValidator validator = new CasValidator("http://localhost:3000", "notticket");
try {
assertTrue(validator.validate().trim().equals(""));
}
catch (CasValidationExcepiton e){
} catch (CasValidationExcepiton e) {
assertTrue(true);
}
catch (Exception e) {
} catch (Exception e) {
e.printStackTrace();
assertTrue(false);
}