File tree Expand file tree Collapse file tree 1 file changed +47
-1
lines changed
tests/component/dataset/infrastructure/mappers Expand file tree Collapse file tree 1 file changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -826,9 +826,55 @@ describe('JS Dataset Mapper', () => {
826826 tags : [ 'tag1' ] ,
827827 categories : [ 'category1' ]
828828 }
829+ ] ,
830+ fileChanges : [
831+ {
832+ fileName : 'file1.txt' ,
833+ md5 : 'd41d8cd98f00b204e9800998ecf8427e' ,
834+ fileId : 1 ,
835+ changed : [
836+ {
837+ fieldName : 'description' ,
838+ oldValue : 'Old description' ,
839+ newValue : 'New description'
840+ }
841+ ]
842+ }
843+ ] ,
844+ filesReplaced : [
845+ {
846+ oldFile : {
847+ fileName : 'file1.txt' ,
848+ MD5 : 'd41d8cd98f00b204e9800998ecf8427e' ,
849+ type : 'text/plain' ,
850+ fileId : 1 ,
851+ filePath : '/path/to/file1.txt' ,
852+ description : 'Test file' ,
853+ isRestricted : false ,
854+ tags : [ 'tag1' ] ,
855+ categories : [ 'category1' ]
856+ } ,
857+ newFile : {
858+ fileName : 'file2.txt' ,
859+ MD5 : 'd41d8cd98f00b204e9800998ecf8427e' ,
860+ type : 'text/plain' ,
861+ fileId : 2 ,
862+ filePath : '/path/to/file2.txt' ,
863+ description : 'New file' ,
864+ isRestricted : false ,
865+ tags : [ 'tag2' ] ,
866+ categories : [ 'category2' ]
867+ }
868+ }
869+ ] ,
870+ termsOfAccess : [
871+ {
872+ fieldName : 'termsOfAccess' ,
873+ oldValue : 'Old terms' ,
874+ newValue : 'New terms'
875+ }
829876 ]
830877 }
831-
832878 const actual = JSDatasetMapper . toDatasetVersionDiff ( jsDatasetVersionDiff )
833879 expect ( expectedDatasetVersionDiff ) . to . deep . equal ( actual )
834880 } )
You can’t perform that action at this time.
0 commit comments