[Timeline] Add more objects to test case

This commit is contained in:
Victor Woeltjen 2016-03-08 10:17:10 -08:00
parent 40895ec1b9
commit 9e6e33983b

View File

@ -28,8 +28,29 @@ define(
var mockDomainObjects,
exporter;
function makeMockDomainObject(model, index) {
var mockDomainObject = jasmine.createSpyObj(
'domainObject-' + index,
[
'getId',
'getCapability',
'useCapability',
'hasCapability',
'getModel'
]
);
mockDomainObject.getId.andReturn('id-' + index);
mockDomainObject.getModel.andReturn(model);
return mockDomainObject;
}
beforeEach(function () {
mockDomainObjects = [];
mockDomainObjects = [
{ composition: [ 'a', 'b', 'c' ] },
{ relationships: { modes: [ 'x', 'y' ] } },
{ }
].map(makeMockDomainObject);
exporter = new TimelineCSVExporter(mockDomainObjects);
});