Skip to content

Commit e7af895

Browse files
committed
More coverage.
1 parent fbdc8cd commit e7af895

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: src/test/java/org/broadinstitute/consent/http/service/DraftServiceTest.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,17 @@ void beforeEach() {
7272
}
7373

7474
@Test
75-
void testCreateDraft() throws SQLException {
75+
void testInsertDraftThrows() throws SQLException {
7676
doThrow(new BadRequestException("Bad Request")).when(draftServiceDAO).insertDraft(any());
7777
assertThrows(BadRequestException.class, () -> draftService.insertDraft(null));
7878
}
7979

80+
@Test
81+
void testInsertDraft() throws SQLException {
82+
doNothing().when(draftServiceDAO).insertDraft(draft);
83+
assertDoesNotThrow(()->draftService.insertDraft(draft));
84+
}
85+
8086
@Test
8187
void testGetAuthorizedDraftNotFound() {
8288
doThrow(new NotFoundException("Not Found")).when(draftServiceDAO)

0 commit comments

Comments
 (0)