37 lines
1.3 KiB
JavaScript
37 lines
1.3 KiB
JavaScript
/**
|
|
* Created by abhatkha on 5/9/17.
|
|
*/
|
|
//This is test suite for baseVO
|
|
|
|
describe("Test AccessMappingVO", function() {
|
|
|
|
var accessMappingObj
|
|
it("AccessMappingVO object creation ", function() {
|
|
|
|
accessMappingObj = new AccessMappingVO();
|
|
expect(accessMappingObj instanceof BaseVO).toEqual(true);
|
|
expect(accessMappingObj instanceof AccessMappingVO).toEqual(true);
|
|
|
|
});
|
|
|
|
it("AccessMappingVO object initilization ", function() {
|
|
|
|
var accessMappinProp= accessMappingObj.getProps();
|
|
|
|
expect(accessMappinProp).toEqual([ 'id', 'createDate']);
|
|
|
|
expect(accessMappingObj.id).toEqual('');
|
|
expect(accessMappingObj.createDate).toBeNull();
|
|
});
|
|
|
|
it("AccessMappingVO test parseAccessMap method", function() {
|
|
|
|
var access = [{id:"actionTest"},
|
|
{id:"add-approverTest"},
|
|
{id:"self-assignmentTest"},
|
|
{id:"randomTest"}];
|
|
|
|
expect(accessMappingObj.parseAccessMap(access, 'incident')).toEqual({ fieldMappings: {'actionTest': undefined, 'add-approverTest': undefined, 'self-assignmentTest': undefined, 'randomTest': undefined }, TestActionAllowed: false,TestaddApproverEditAllowed: false, TestSelfAssignmentAllowed: false, randomTestEditAllowed: false });
|
|
|
|
});
|
|
}); |