57 lines
2.2 KiB
JavaScript
57 lines
2.2 KiB
JavaScript
/**
|
|
* Created by abhatkha on 5/8/17.
|
|
*/
|
|
//This is test suite for baseVO
|
|
|
|
describe("Test SocialProfileVO", function() {
|
|
|
|
var socialProfileObj
|
|
it(" should create object ", function() {
|
|
|
|
socialProfileObj = new SocialProfileVO();
|
|
expect(socialProfileObj instanceof BaseVO).toEqual(true);
|
|
expect(socialProfileObj instanceof SocialProfileVO).toEqual(true);
|
|
|
|
});
|
|
|
|
it(" should initilize objects with all properties ", function() {
|
|
|
|
var socialProfileProp= socialProfileObj.getProps();
|
|
|
|
expect(socialProfileProp).toEqual(['id', 'createDate','jid', 'elementId', 'available', 'deleted', 'desc', 'displayName', 'firstName', 'lastName', 'tenantId', 'profileType', 'extraData', 'thumbnail']);
|
|
|
|
expect(socialProfileObj.id).toBeDefined();
|
|
expect(socialProfileObj.id ).toEqual('');
|
|
expect(socialProfileObj.createDate).toBeDefined();
|
|
expect(socialProfileObj.jid ).toEqual('');
|
|
expect(socialProfileObj.elementId ).toEqual('');
|
|
expect(socialProfileObj.available ).toEqual('');
|
|
expect(socialProfileObj.deleted ).toBeFalsy();
|
|
expect(socialProfileObj.desc ).toEqual('');
|
|
expect(socialProfileObj.displayName ).toEqual('');
|
|
expect(socialProfileObj.firstName ).toEqual('');
|
|
expect(socialProfileObj.lastName ).toEqual('');
|
|
expect(socialProfileObj.tenantId ).toEqual('');
|
|
expect(socialProfileObj.profileType ).toEqual('');
|
|
expect(socialProfileObj.extraData ).toEqual('');
|
|
expect(socialProfileObj.thumbnail ).toEqual('');
|
|
expect(socialProfileObj.deleted ).not.toBeTruthy();
|
|
|
|
|
|
});
|
|
|
|
it(" should run postBuild method with different options ", function() {
|
|
|
|
socialProfileObj.postBuild();
|
|
|
|
socialProfileObj.elementId = 'Social Profile';
|
|
socialProfileObj.jid = 'Social Profile';
|
|
socialProfileObj.extraData = '{"test":"test"}';
|
|
|
|
socialProfileObj.postBuild();
|
|
|
|
expect(socialProfileObj.elementId ).toEqual('Social_Profile');
|
|
expect(socialProfileObj.jid ).toEqual('Social_Profile');
|
|
|
|
});
|
|
}); |