aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/vnfs/build-artifacts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/vnfs/build-artifacts')
-rw-r--r--src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts
index fbf6d72..f39f08b 100644
--- a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts
+++ b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.spec.ts
@@ -1005,4 +1005,16 @@ describe('ReferenceDataformComponent', () => {
let evnt = {target: {files: [file]}};
component.upload(evnt);
});
+
+ it('Should validatte fileChange method if file type is xml', async(() => {
+ let reader = new FileReader();
+ let content = "{data : 'Hello World'}";
+ let data = new Blob([content], { type: 'text/plain' });
+ let arrayOfBlob = new Array<Blob>();
+ arrayOfBlob.push(data);
+ let file = new File(arrayOfBlob, "Mock.XLS");
+ let input = {target: {files: [file]}};
+
+ component.fileChange(input);
+ }));
}); \ No newline at end of file