ES6: Uses proper normalize method, includes support for namespaced

controllers.
This commit is contained in:
Robin Ward
2014-05-01 12:45:52 -04:00
parent 44b2f82be8
commit b98324a937
3 changed files with 36 additions and 28 deletions

View File

@ -14,11 +14,6 @@ function setTemplates(lookupStrings) {
});
}
function normalized(input, expected, desc) {
var resolver = Discourse.Resolver.create({namespace: Discourse});
equal(resolver.normalizeName(input), expected, desc);
}
module("Discourse.Resolver", {
setup: function() {
originalTemplates = Ember.TEMPLATES;
@ -34,12 +29,6 @@ module("Discourse.Resolver", {
}
});
test("normalizeName", function() {
normalized('header', 'header', 'a single word stays the same');
normalized('avatarSelector', 'avatar-selector', 'camel case is converted to dashed');
normalized('avatar_selector', 'avatar-selector', 'underscores are converted to dashes');
});
test("finds templates in top level dir", function() {
setTemplates([
"foobar",