48 lines
1.5 KiB
JavaScript
48 lines
1.5 KiB
JavaScript
/**
|
|
* Created by abhatkha on 5/9/17.
|
|
*/
|
|
//This is test suite for baseVO
|
|
|
|
describe("Test HistoryVO", function() {
|
|
|
|
var historyObj
|
|
it("HistoryVO object creation ", function() {
|
|
|
|
historyObj = new HistoryVO();
|
|
expect(historyObj instanceof BaseVO).toEqual(true);
|
|
expect(historyObj instanceof HistoryVO).toEqual(true);
|
|
|
|
});
|
|
|
|
it("HistoryVO object initilization ", function() {
|
|
|
|
var historyProp= historyObj.getProps();
|
|
|
|
expect(historyProp).toEqual( [ 'id', 'createDate', 'type', 'ticketType', 'summary', 'id', 'displayId', 'priority', 'articleId', 'title']);
|
|
|
|
expect(historyObj.id).toEqual('');
|
|
expect(historyObj.createDate).not.toBeDefined();
|
|
|
|
expect(historyObj.type).toEqual('');
|
|
expect(historyObj.ticketType ).toEqual('');
|
|
expect(historyObj.summary).toEqual('');
|
|
expect(historyObj.displayId).toEqual('');
|
|
|
|
expect(historyObj.priority ).toEqual('');
|
|
expect(historyObj.articleId ).toEqual('');
|
|
expect(historyObj.title ).toEqual('');
|
|
|
|
});
|
|
|
|
|
|
it("HistoryVO test postBuild method", function() {
|
|
|
|
historyObj.postBuild();
|
|
expect(historyObj.type).toEqual(EntityVO.TYPE_TICKET);
|
|
|
|
historyObj.type = EntityVO.TYPE_KNOWLEDGE;
|
|
historyObj.postBuild();
|
|
expect(historyObj.summary ).toEqual(historyObj.title);
|
|
expect(historyObj.displayId ).toEqual(historyObj.articleId);
|
|
});
|
|
}); |