Skip to content
Snippets Groups Projects

Add tests for Lab model

Files

@@ -543,7 +543,7 @@ public class Lab implements Serializable {
}
public boolean display() {
return slot.getClosesAt().plusMinutes(15).isAfter(now()) || isOpenOrSlotSelection();
return slot.getClosesAt().plusMinutes(15).isAfter(now());
}
public boolean hasRoom(Room room) {
@@ -582,7 +582,7 @@ public class Lab implements Serializable {
*/
public boolean userAllowedForThisLab(User user) {
List<FirstYearStudent> students = user.getFirstYearStudents();
if (students == null) {
if (students.isEmpty()) {
return allowWithoutMentorGroup;
}
List<FirstYearStudent> activeStudents = students.stream()
Loading