aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/shared
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-08-06 16:43:28 +0530
committerTakamune Cho <tc012c@att.com>2018-08-06 17:44:29 +0000
commite9aea50182e65fa515548d3f27bbca42829b5e23 (patch)
tree6ef1a2bb92225eb25c07e2b8a9173cee162add9d /src/app/shared
parentc33fda511698951862bf6c208171296a44fa3403 (diff)
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 <arundpil@in.ibm.com>
Diffstat (limited to 'src/app/shared')
-rw-r--r--src/app/shared/services/utilityService/utility.service.spec.ts12
1 files changed, 10 insertions, 2 deletions
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', '');
+ }));
});