Skip to content

Commit 7080016

Browse files
committed
fix: recover the test
1 parent 55c5e3b commit 7080016

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/integration/files/FilesRepository.test.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import {
2424
import {
2525
DatasetNotNumberedVersion,
2626
CreatedDatasetIdentifiers,
27-
createDataset
27+
createDataset,
28+
Dataset
2829
} from '../../../src/datasets'
2930
import { FileModel } from '../../../src/files/domain/models/FileModel'
3031
import { FileCounts } from '../../../src/files/domain/models/FileCounts'
@@ -491,6 +492,18 @@ describe('FilesRepository', () => {
491492
expect(actual.name).toBe(testTextFile1Name)
492493
})
493494

495+
test('should return file and dataset when providing id, version, and returnDatasetVersion is true', async () => {
496+
const actual = (await sut.getFile(
497+
testFileId,
498+
DatasetNotNumberedVersion.DRAFT,
499+
true,
500+
false
501+
)) as [FileModel, Dataset]
502+
503+
expect(actual[0].name).toBe(testTextFile1Name)
504+
expect(actual[1].id).toBe(testDatasetIds.numericId)
505+
})
506+
494507
test('should return error when file does not exist', async () => {
495508
const expectedError = new ReadError(`[404] File with ID ${nonExistentFiledId} not found.`)
496509

0 commit comments

Comments
 (0)