Revert "ES6: Uses proper normalize method, includes support for namespaced"

This reverts commit b98324a937f372cfef2295401d180f33e8e6eeb3.
This commit is contained in:
Robin Ward
2014-05-05 13:58:42 -04:00
parent 389c50eb1e
commit 69225a7ea9
3 changed files with 28 additions and 36 deletions

View File

@ -14,6 +14,11 @@ 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;
@ -29,6 +34,12 @@ 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",