Skip to content

Commit

Permalink
Add test for 'cannot approve sequences with errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fhennig committed Nov 12, 2024
1 parent feb8f09 commit d5db67c
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,25 @@ class ApproveProcessedDataEndpointTest(
.assertStatusIs(PROCESSED)
}

@Test
fun `WHEN approving sequences with errors THEN an error is raised`() {
val submittedSequences =
convenienceClient.prepareDefaultSequenceEntriesToInProcessing()
val accessionOfDataWithErrors = submittedSequences[0].accession
convenienceClient.submitProcessedData(
PreparedProcessedData.withErrors(accession = accessionOfDataWithErrors),
)

client.approveProcessedSequenceEntries(
scope = WITHOUT_WARNINGS,
accessionVersionsFilter = listOf(AccessionVersion(accessionOfDataWithErrors, 1)),
)
.andExpect(status().isUnprocessableEntity)

convenienceClient.getSequenceEntry(accession = accessionOfDataWithErrors, version = 1)
.assertStatusIs(PROCESSED)
}

@Test
fun `WHEN superuser approves all entries THEN is successfully approved`() {
val accessionVersions = convenienceClient
Expand Down

0 comments on commit d5db67c

Please sign in to comment.