From: Arundathi Patil Date: Mon, 6 Aug 2018 11:13:28 +0000 (+0530) Subject: utility service : added test case X-Git-Tag: 1.4.0~59 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=e9aea50182e65fa515548d3f27bbca42829b5e23;p=appc%2Fcdt.git utility service : added test case wrote test case to cover processApiSubscribe function on artifact upload Issue-ID: APPC-1064 Change-Id: I9e01f6c9e9a099a5fff44924ed4158efeb56d467 Signed-off-by: Arundathi Patil --- diff --git a/src/app/shared/services/utilityService/utility.service.spec.ts b/src/app/shared/services/utilityService/utility.service.spec.ts index e35bfed..4054a89 100644 --- a/src/app/shared/services/utilityService/utility.service.spec.ts +++ b/src/app/shared/services/utilityService/utility.service.spec.ts @@ -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', ''); + })); });