test(account): cover missing picker business date
This commit is contained in:
+8
@@ -1,6 +1,7 @@
|
||||
package com.lab.labtimesheet.feature.account.service;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.time.Instant;
|
||||
@@ -83,6 +84,13 @@ class EligibleInternOptionIntegrationTest {
|
||||
assertThat(options).extracting(EligibleInternOption::userId).doesNotHaveDuplicates();
|
||||
}
|
||||
|
||||
@Test
|
||||
void rejectsMissingBusinessDate() {
|
||||
assertThatThrownBy(() -> accounts.eligibleInternOptions(null))
|
||||
.isInstanceOf(IllegalArgumentException.class)
|
||||
.hasMessage("Business date is required");
|
||||
}
|
||||
|
||||
private long activeIntern(String displayName, String studentCode, LocalDate startDate, LocalDate endDate) {
|
||||
long userId = activeUser(GlobalRole.INTERN, displayName);
|
||||
activeProfile(userId, studentCode, startDate, endDate);
|
||||
|
||||
Reference in New Issue
Block a user