Test verifying project type validation on author idea selection
This commit is contained in:
parent
23e0a7f5ea
commit
2842b64302
@ -401,6 +401,17 @@ public class IdeaServiceImplTest {
|
||||
assertEquals(expected, ideaService.countAuthorsByApplicationPeriod(applicationPeriod, params));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void wrong_type_for_author() {
|
||||
when(applicationPeriodService.getTypesForStudent(applicationPeriod, student)).thenReturn(List.of(master));
|
||||
|
||||
assertPair(
|
||||
false,
|
||||
"The idea is the wrong level for you, please pick another one.",
|
||||
ideaService.validateStudentAcceptance(createBachelorIdea(Idea.Status.UNMATCHED), student, coAuthor, applicationPeriod)
|
||||
);
|
||||
}
|
||||
|
||||
private Idea mockInactiveIdea() {
|
||||
Idea idea = new Idea();
|
||||
Match match = new Match();
|
||||
|
Loading…
x
Reference in New Issue
Block a user