Skip to content

Commit 6bae75c

Browse files
committed
Added: test assertions to updateDataset IT
1 parent 11fdbc2 commit 6bae75c

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

test/integration/datasets/DatasetsRepository.test.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,33 @@ describe('DatasetsRepository', () => {
600600
DatasetNotNumberedVersion.LATEST,
601601
false
602602
)
603-
603+
604+
expect(actualUpdatedDataset.metadataBlocks[0].fields.title).toBe(
605+
'Dataset created using the createDataset use case'
606+
)
607+
expect((actualUpdatedDataset.metadataBlocks[0].fields.author[0] as Author).authorName).toBe(
608+
'Admin, Dataverse'
609+
)
610+
expect(
611+
(actualUpdatedDataset.metadataBlocks[0].fields.author[0] as Author).authorAffiliation
612+
).toBe('Dataverse.org')
613+
expect((actualUpdatedDataset.metadataBlocks[0].fields.author[1] as Author).authorName).toBe(
614+
'Owner, Dataverse'
615+
)
616+
expect(
617+
(actualUpdatedDataset.metadataBlocks[0].fields.author[1] as Author).authorAffiliation
618+
).toBe('Dataversedemo.org')
619+
expect(
620+
(actualUpdatedDataset.metadataBlocks[0].fields.datasetContact[0] as DatasetContact)
621+
.datasetContactEmail
622+
623+
expect(
624+
(actualUpdatedDataset.metadataBlocks[0].fields.datasetContact[0] as DatasetContact)
625+
.datasetContactName
626+
).toBe('Finch, Fiona')
627+
expect(actualUpdatedDataset.metadataBlocks[0].fields.subject).toContain(
628+
'Medicine, Health and Life Sciences'
629+
)
604630
expect(
605631
(actualUpdatedDataset.metadataBlocks[0].fields.dsDescription[0] as DatasetDescription)
606632
.dsDescriptionValue

0 commit comments

Comments
 (0)