utility service : added test case 69/59169/3
authorArundathi Patil <arundpil@in.ibm.com>
Mon, 6 Aug 2018 11:13:28 +0000 (16:43 +0530)
committerTakamune Cho <tc012c@att.com>
Mon, 6 Aug 2018 17:44:29 +0000 (17:44 +0000)
wrote test case to cover processApiSubscribe function on artifact upload

Issue-ID: APPC-1064
Change-Id: I9e01f6c9e9a099a5fff44924ed4158efeb56d467
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
src/app/shared/services/utilityService/utility.service.spec.ts

index e35bfed..4054a89 100644 (file)
@@ -18,8 +18,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-
-ECOMP is a trademark and service mark of AT&T Intellectual Property.
 ============LICENSE_END============================================
 */
 
@@ -73,4 +71,14 @@ describe('UtilityService', () => {
         let result = { output: {status: {code: '400'}}};
         service.processApiSubscribe(result, 'getArtifact', '');
     }));
+
+    it('should set warning message on status 401 and artifact upload', inject([UtilityService], (service: UtilityService) => {
+        let result = { output: {status: {code: '401'}}};
+        service.processApiSubscribe(result, 'uploadArtifact', '');
+    }));
+
+    it('should set suceess message on status 400 and artifact upload', inject([UtilityService], (service: UtilityService) => {
+        let result = { output: {status: {code: '400'}}};
+        service.processApiSubscribe(result, 'uploadArtifact', '');
+    }));
 });