[Timeline] Test mct-representation ordering

Verify that a configuration object has been added to scope before
changing templates. #908
This commit is contained in:
Victor Woeltjen 2016-05-19 15:09:52 -07:00
parent b5229d7786
commit 2a4004fd5b

View File

@ -194,6 +194,21 @@ define(
.toHaveBeenCalledWith(testViews[1]);
});
it("exposes configuration before changing templates", function () {
var observedConfiguration;
mockChangeTemplate.andCallFake(function () {
observedConfiguration = mockScope.configuration;
});
mockScope.key = "xyz";
mockScope.domainObject = mockDomainObject;
fireWatch('key', mockScope.key);
fireWatch('domainObject', mockDomainObject);
expect(observedConfiguration).toBeDefined();
});
it("does not load templates until there is an object", function () {
mockScope.key = "xyz";