[Templates] Update mct-container spec

...to reflect change to template over templateUrl
This commit is contained in:
Victor Woeltjen 2016-02-26 16:17:33 -08:00
parent 164c2faf07
commit 9b21b0b7f2

View File

@ -30,12 +30,12 @@ define(
var testContainers = [
{
bundle: { path: "a", resources: "b" },
templateUrl: "c/template.html",
template: "<div>foo</div>",
key: "abc"
},
{
bundle: { path: "x", resources: "y" },
templateUrl: "z/template.html",
template: "<span>bar</span>",
key: "xyz",
attributes: [ "someAttr", "someOtherAttr" ]
}
@ -55,15 +55,15 @@ define(
});
it("chooses a template based on key", function () {
expect(mctContainer.templateUrl(
expect(mctContainer.template(
undefined,
{ key: "abc" }
)).toEqual("a/b/c/template.html");
)).toEqual(testContainers[0].template);
expect(mctContainer.templateUrl(
expect(mctContainer.template(
undefined,
{ key: "xyz" }
)).toEqual("x/y/z/template.html");
)).toEqual(testContainers[1].template);
});
it("copies attributes needed by the container", function () {