@@ -1295,25 +1295,22 @@ describe('CollectionsRepository', () => {
12951295 ) . rejects . toThrow ( expectedError )
12961296 } )
12971297
1298- // TODO:ME - Fix from API. getting 500 error right now instead of 400
1299-
1300- // eslint-disable-next-line jest/no-commented-out-tests
1301- // it('should return error when the dvObjectIdentifier of a file does not exist', async () => {
1302- // const invalidFileId = '99'
1303- // const newFeaturedItems: DvObjectFeaturedItemDTO[] = [
1304- // {
1305- // type: DvObjectFeaturedItemType.FILE,
1306- // dvObjectIdentifier: invalidFileId,
1307- // displayOrder: 0
1308- // }
1309- // ]
1310- // const expectedError = new WriteError(
1311- // `[400] Cant find Collection, Dataset, or Datafile with identifier: ${invalidFileId}.`
1312- // )
1313- // await expect(
1314- // sut.updateCollectionFeaturedItems(testCollectionAlias, newFeaturedItems)
1315- // ).rejects.toThrow(expectedError)
1316- // })
1298+ it ( 'should return error when the dvObjectIdentifier of a file does not exist' , async ( ) => {
1299+ const invalidFileId = '99'
1300+ const newFeaturedItems : DvObjectFeaturedItemDTO [ ] = [
1301+ {
1302+ type : DvObjectFeaturedItemType . FILE ,
1303+ dvObjectIdentifier : invalidFileId ,
1304+ displayOrder : 0
1305+ }
1306+ ]
1307+ const expectedError = new WriteError (
1308+ `[400] Cant find Collection, Dataset, or Datafile with identifier: ${ invalidFileId } .`
1309+ )
1310+ await expect (
1311+ sut . updateCollectionFeaturedItems ( testCollectionAlias , newFeaturedItems )
1312+ ) . rejects . toThrow ( expectedError )
1313+ } )
13171314
13181315 it ( 'should return error when the collection to feature is not published' , async ( ) => {
13191316 const unpublishedCollectionAlias = 'unpublished-collection-featured-item-test'
0 commit comments