aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/vnfs/build-artifacts/reference-dataform
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-07-30 15:28:56 +0530
committerTakamune Cho <tc012c@att.com>2018-08-02 23:23:58 +0000
commit798604767dfe3d0ab3bb23707ad4b8c8bb4993bd (patch)
treef59b402e205c653f45afd5a9cfab65dd4eb699ef /src/app/vnfs/build-artifacts/reference-dataform
parent1ff02a5105137098ff17dda635f121e4e0036095 (diff)
Reference-dataform- test cases
Wrote test case to cover upload function in refernce-dataform.component Issue-ID: APPC-1064 Change-Id: I44c62b944c14b9f66fc2117ad7d578b2388e973b Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'src/app/vnfs/build-artifacts/reference-dataform')
-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 3d899c1..fbf6d72 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
@@ -2,6 +2,8 @@
============LICENSE_START==========================================
===================================================================
Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+
+Modification Copyright (C) 2018 IBM.
===================================================================
Unless otherwise specified, all software contained herein is licensed
@@ -993,4 +995,14 @@ describe('ReferenceDataformComponent', () => {
component.deviceProtocolChange();
expect(spy).toHaveBeenCalled()
});
+
+ it('should test uplaod function', () => {
+ let content = "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 evnt = {target: {files: [file]}};
+ component.upload(evnt);
+ });
}); \ No newline at end of file