SmartIT_Extensions/BMC/smart-it-full/test/app/knowledge-article/knowledge-article-vo.spec.js

36 lines
2.2 KiB
JavaScript

/**
* Created by npatil2 on 10/17/2017.
*/
describe('KnowledgeArticleVO', function () {
var knowledgeArticleVO;
it(' should do object creation ', function () {
knowledgeArticleVO = new KnowledgeArticleVO();
expect(knowledgeArticleVO instanceof BaseVO).toEqual(true);
expect(knowledgeArticleVO instanceof KnowledgeArticleVO).toEqual(true);
});
it('should do object initilization ', function () {
this.knowledgeArticleVOProps = knowledgeArticleVO.getProps();
expect(this.knowledgeArticleVOProps).toEqual(['id', 'createDate', 'title', 'isDraft', 'createDate', 'updateDate', 'modifiedDate', 'desc', 'likePercentage', 'rating', 'useCount', 'notUsefulCount', 'viewCount', 'type', 'articleId', 'status', 'following', 'tags', 'entityLink', 'uuid', 'templateId', 'templateName', 'version', 'favorite', 'flagged', 'articleGUID', 'isLastVersion', 'isInApproval', 'attachmentLimit', 'internalUse', 'perfAssessment', 'additionalCategoriesOrganization', 'additionalCategoriesSite', 'additionalCategoriesBusinessService', 'additionalCategoriesCompanies', 'additionalCategorization', 'articleVisibilityGroup', 'categorizations', 'content', 'assignee', 'author', 'owner', 'company', 'comments', 'hashTags', 'accessMappings', 'assigneeGroup', 'supportGroup', 'language', 'autoAssign', 'site', 'businessService', 'organization', 'commentCount', 'allCompanies', 'allSites', 'allServices', 'allOrganizations', 'approvalProcessName', 'isPasswordEnabled']);
knowledgeArticleVO.accessMappings = null;
this.knowledgeArticleVOBuild = knowledgeArticleVO.postBuild();
knowledgeArticleVO.author = {
getFullName: function () {
return
},
thumbnailMime: true,
thumbnail: true
};
this.knowledgeArticleVOFullName = knowledgeArticleVO.getAuthorFullName();
expect(this.knowledgeArticleVOFullName).toEqual('');
this.knowledgeArticleVOThumbnail = knowledgeArticleVO.getAuthorThumbnail();
expect(this.knowledgeArticleVOThumbnail).toEqual('data:true;base64,true');
this.knowledgeArticleVODecisionTree = knowledgeArticleVO.isDecisionTree();
expect(this.knowledgeArticleVODecisionTree).toBe(false);
});
});