Skip to content

Commit 3f5994d

Browse files
authored
Merge pull request #2644 from objectcomputing/review_assignment_test
Updated the review assignment controller test to reflect the latest change to the review period controller.
2 parents d31d799 + e8b9a1f commit 3f5994d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

server/src/test/java/com/objectcomputing/checkins/services/reviews/ReviewAssignmentControllerTest.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,13 @@ void testGETFindAssignmentsByPeriodIdDefaultAssignments() {
146146

147147
final HttpResponse<Set<ReviewAssignment>> response = client.toBlocking().exchange(request, Argument.setOf(ReviewAssignment.class));
148148

149+
// A review period only has default review assignments added to it when
150+
// the review period is created through the controller. And, they are
151+
// no longer added to the review period when retrieving the review
152+
// assignments for a specific review period. Therefore, this review
153+
// period should have zero review assignments associated with it.
149154
assertNotNull(response.body());
150-
assertEquals(3, Objects.requireNonNull(response.body()).size());
151-
assertTrue(response.body().stream().anyMatch(ra -> ra.getRevieweeId().equals(memberOne.getId())));
152-
assertTrue(response.body().stream().anyMatch(ra -> ra.getRevieweeId().equals(memberTwo.getId())));
153-
assertTrue(response.body().stream().anyMatch(ra -> ra.getRevieweeId().equals(memberThree.getId())));
154-
assertEquals(HttpStatus.OK, response.getStatus());
155+
assertEquals(0, Objects.requireNonNull(response.body()).size());
155156
}
156157

157158
@Test
@@ -287,4 +288,4 @@ void deleteReviewAssignmentWithoutPermissions() {
287288
assertNotNull(responseException.getResponse());
288289
assertEquals(HttpStatus.FORBIDDEN, responseException.getStatus());
289290
}
290-
}
291+
}

0 commit comments

Comments
 (0)