40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
/**
|
|
* Created by abhatkha on 5/8/17.
|
|
*/
|
|
//This is test suite for baseVO
|
|
|
|
describe("Test SupportGroupVO", function() {
|
|
|
|
var supportGroupObj
|
|
it(" should create object ", function() {
|
|
|
|
supportGroupObj = new SupportGroupVO();
|
|
expect(supportGroupObj instanceof BaseVO).toEqual(true);
|
|
expect(supportGroupObj instanceof SupportGroupVO).toEqual(true);
|
|
|
|
});
|
|
|
|
it(" should initilize objects with all properties ", function() {
|
|
|
|
var supportGroupProp= supportGroupObj.getProps();
|
|
|
|
expect(supportGroupProp).toEqual(['id', 'createDate', 'name', 'organization', 'company']);
|
|
|
|
expect(supportGroupObj.id).toBeDefined();
|
|
expect(supportGroupObj.id ).toEqual('');
|
|
expect(supportGroupObj.createDate).toBeDefined();
|
|
expect(supportGroupObj.name ).toEqual('');
|
|
expect(supportGroupObj.organization ).toEqual('');
|
|
expect(supportGroupObj.company ).not.toEqual('');
|
|
expect(supportGroupObj.company ).toEqual({});
|
|
|
|
});
|
|
|
|
it(" should run postBuild method with different options ", function() {
|
|
|
|
expect(supportGroupObj.companyName ).not.toBeDefined();
|
|
supportGroupObj.postBuild();
|
|
expect(supportGroupObj.companyName ).toEqual(supportGroupObj.company.name);
|
|
|
|
});
|
|
}); |